public class SocketServer extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
addServer(UaTcpStackServer server) |
void |
bind() |
static SocketServer |
boundTo(InetAddress address) |
static SocketServer |
boundTo(InetAddress address,
int port) |
static SocketServer |
boundTo(InetSocketAddress address) |
static SocketServer |
boundTo(String address) |
static SocketServer |
boundTo(String address,
int port) |
SocketAddress |
getLocalAddress() |
UaTcpStackServer |
getServer(String endpointUrl)
Get the server identified
endpointUrl. |
boolean |
isStrictEndpointUrlsEnabled() |
void |
removeServer(UaTcpStackServer server) |
void |
setStrictEndpointUrlsEnabled(boolean strictEndpointUrlsEnabled)
If
true, during a getServer(String) call the path of the endpoint URL must exactly match a
registered server name. |
void |
shutdown() |
static void |
shutdownAll() |
public void bind()
throws ExecutionException,
InterruptedException
public void addServer(UaTcpStackServer server)
public void removeServer(UaTcpStackServer server)
public UaTcpStackServer getServer(String endpointUrl)
endpointUrl.UaTcpStackServer identified by endpointUrl.public SocketAddress getLocalAddress()
public void shutdown()
public boolean isStrictEndpointUrlsEnabled()
true if strict endpoint URLs are enabled.public void setStrictEndpointUrlsEnabled(boolean strictEndpointUrlsEnabled)
true, during a getServer(String) call the path of the endpoint URL must exactly match a
registered server name. If false, and only one server is registered, that server will be returned even
if the path does not match.strictEndpointUrlsEnabled - true if strict endpoint URLs should be enabled.public static SocketServer boundTo(String address) throws Exception
Exceptionpublic static SocketServer boundTo(String address, int port) throws Exception
Exceptionpublic static SocketServer boundTo(InetAddress address) throws Exception
Exceptionpublic static SocketServer boundTo(InetAddress address, int port) throws Exception
Exceptionpublic static SocketServer boundTo(InetSocketAddress address) throws Exception
Exceptionpublic static void shutdownAll()
Copyright © 2015. All rights reserved.