|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opcfoundation.ua.utils.AbstractState<CloseableObjectState,ServiceResultException>
org.opcfoundation.ua.transport.tcp.nio.OpcTcpServer
public class OpcTcpServer
EndpointOpcTcp hosts an endpoint for opc.tcp socket. Endpoint discovery is provided if endpoint url is unknown.
for creating executor instances| Nested Class Summary | |
|---|---|
class |
OpcTcpServer.OpcTcpEndpointHandle
|
class |
OpcTcpServer.SocketHandle
|
| Nested classes/interfaces inherited from interface org.opcfoundation.ua.transport.EndpointServer |
|---|
EndpointServer.EndpointHandle |
| Nested classes/interfaces inherited from interface org.opcfoundation.ua.transport.ConnectionMonitor |
|---|
ConnectionMonitor.ConnectListener |
| Field Summary | |
|---|---|
EndpointBinding |
discoveryEndpointBinding
|
Server |
discoveryServer
Service server used when client connects with "" url for endpoint discovery |
| Fields inherited from interface org.opcfoundation.ua.transport.EndpointServer |
|---|
discoveryEndpoint |
| Constructor Summary | |
|---|---|
OpcTcpServer(Application application)
Constructor for OpcTcpServer. |
|
| Method Summary | |
|---|---|
void |
addConnectionListener(ConnectionMonitor.ConnectListener l)
addConnectionListener. |
EndpointServer.EndpointHandle |
bind(SocketAddress socketAddress,
EndpointBinding endpointBinding)
Bind an endpoint to a handle. |
OpcTcpServer |
close()
Close the object. |
void |
disconnectAll()
Disconnect all existing connections. |
SocketAddress |
getBoundAddress()
getBoundAddress. |
List<SocketAddress> |
getBoundSocketAddresses()
getBoundSocketAddresses. |
void |
getConnections(Collection<ServerConnection> result)
getConnections. |
EncoderContext |
getEncoderContext()
getEncoderContext. |
EndpointBindingCollection |
getEndpointBindings()
Get a collection that contains related endpoints bindings. |
int |
getReceiveBufferSize()
Getter for the field receiveBufferSize. |
void |
removeConnectionListener(ConnectionMonitor.ConnectListener l)
removeConnectionListener. |
void |
setReceiveBufferSize(int receiveBufferSize)
Define the receiveBufferSize to use for the connection socket of the server. |
OpcTcpServer.SocketHandle[] |
socketHandleSnapshot()
socketHandleSnapshot. |
String |
toString()
|
| Methods inherited from class org.opcfoundation.ua.utils.AbstractState |
|---|
addStateListener, addStateNotifiable, assertNoError, attemptSetState, clearError, getError, getState, hasError, isStateTransitionAllowed, onListenerException, onStateTransition, removeStateListener, removeStateNotifiable, setError, setState, setState, waitForState, waitForState, waitForStateUninterruptibly |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.opcfoundation.ua.utils.IStatefulObject |
|---|
addStateListener, addStateNotifiable, getError, getState, removeStateListener, removeStateNotifiable, waitForState, waitForState, waitForStateUninterruptibly |
| Field Detail |
|---|
public Server discoveryServer
public EndpointBinding discoveryEndpointBinding
| Constructor Detail |
|---|
public OpcTcpServer(Application application)
throws ServiceResultException
Constructor for OpcTcpServer.
application - a Application object.
ServiceResultException - if any.| Method Detail |
|---|
public EncoderContext getEncoderContext()
getEncoderContext.
getEncoderContext in interface EndpointServerEncoderContext object.public int getReceiveBufferSize()
Getter for the field receiveBufferSize.
public void setReceiveBufferSize(int receiveBufferSize)
throws ServiceResultException
Default value: 0, which omits the parameter and the default value for the socket (depending on the operating system) is used.
receiveBufferSize - the new size in bytes
ServiceResultException - if any.
public EndpointServer.EndpointHandle bind(SocketAddress socketAddress,
EndpointBinding endpointBinding)
throws ServiceResultException
bind in interface EndpointServersocketAddress - a SocketAddress object.endpointBinding - a EndpointBinding object.
EndpointServer.EndpointHandle object.
ServiceResultException - if any.public List<SocketAddress> getBoundSocketAddresses()
getBoundSocketAddresses.
getBoundSocketAddresses in interface EndpointServerList object.public SocketAddress getBoundAddress()
getBoundAddress.
SocketAddress object.public void disconnectAll()
public OpcTcpServer close()
close in interface CloseableObjectCloseableObject object.public void addConnectionListener(ConnectionMonitor.ConnectListener l)
addConnectionListener.
addConnectionListener in interface ConnectionMonitorl - a ConnectionMonitor.ConnectListener object.public void getConnections(Collection<ServerConnection> result)
getConnections.
getConnections in interface ConnectionMonitorresult - a Collection object.public void removeConnectionListener(ConnectionMonitor.ConnectListener l)
removeConnectionListener.
removeConnectionListener in interface ConnectionMonitorl - a ConnectionMonitor.ConnectListener object.public EndpointBindingCollection getEndpointBindings()
getEndpointBindings in interface EndpointServerpublic String toString()
toString in class Objectpublic OpcTcpServer.SocketHandle[] socketHandleSnapshot()
socketHandleSnapshot.
OpcTcpServer.SocketHandle objects.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||