@Deprecated public class ServerSocketTestHelper extends Object
The class provides facility for automated port allocation by system for server connectors in tests.
Usage:
createPortPromise(String)
Example:
PromiseserverPort = ServerSocketTestHelper.createPortPromise("connector-name"); ... String serverConnectorAddress = ":0[name=connector-name]" // configure server side using serverConnectorAddress ... String serverAddress = "localhost:" + serverPort.await(...); // configure client side using serverAddress
Modifier and Type | Method and Description |
---|---|
static void |
completePortPromise(String connectorName,
int port)
Deprecated.
Fill a port promise associated with provided connector name (if it exists).
|
static com.dxfeed.promise.Promise<Integer> |
createPortPromise(String connectorName)
Deprecated.
Create a promise to retrieve a local port of specified server connector.
|
static void |
failPortPromise(String connectorName,
Throwable exception)
Deprecated.
Fail a port promise associated with provided connector name (if it exists).
|
public static com.dxfeed.promise.Promise<Integer> createPortPromise(String connectorName)
connectorName
- - a name of connector to be auto configuredpublic static void completePortPromise(String connectorName, int port)
connectorName
- - a name of promise to be completedport
- - a local port value of connectorpublic static void failPortPromise(String connectorName, Throwable exception)
connectorName
- - a name of promise to be completedexception
- - a cause of connection failureCopyright © 2002–2025 Devexperts LLC. All rights reserved.