DOFServer ClassOpenDOF Object Access Library
DOFServer is associated with a DOF.
Inheritance Hierarchy

SystemObject
  org.opendof.core.oalDOFServer

Namespace: org.opendof.core.oal
Assembly: dof-oal (in dof-oal.dll) Version: 7.0.1.2
Syntax

C#
public sealed class DOFServer

The DOFServer type exposes the following members.

Methods

  NameDescription
Public methodaddStateListener
Add a StateListener . The stateListener will be notified immediately with the current state of the server and then on subsequent server state changes.

There is a possible race condition if you add the listener right after calling start(int) . That is, your listener may be called twice with the "started" state. It is preferable to add the listener before calling start(). Your listener will then be called twice: once with a "!started" state and then again with "started".

Public methodbeginRestart(Int32)
Restart a server, waiting up to timeout for the server to be restarted.
Public methodbeginRestart(Int32, DOFServerStartOperationListener)
Restart a server, waiting up to timeout for the server to be restarted.
Public methodbeginRestart(Int32, DOFServerStartOperationListener, Object)
Restart a server, waiting up to timeout for the server to be restarted.
Public methodbeginStart(Int32)
Start a server, waiting up to timeout for the server to be started.
Public methodbeginStart(Int32, DOFServerStartOperationListener)
Start a server, waiting up to timeout for the server to be started.
Public methodbeginStart(Int32, DOFServerStartOperationListener, Object)
Start a server, waiting up to timeout for the server to be started.
Public methodcreateConnection
Create one of the following connections related to this server.
Public methodcreateServer
Create a server related to this server.
Public methoddestroy
Destroy is used to clean up resources allocated during DOFServer creation.
Public methodEquals (Overrides ObjectEquals(Object).)
Public methodgetConnectionCount
Get the current number of connections connected to this server.
Public methodgetConnections
Get the list of connections connected to this server.
Public methodGetHashCode (Overrides ObjectGetHashCode.)
Public methodgetRelatedServer
Multicast groups require a related DOFServer.
Public methodgetState
Get the current instantaneous state of the server.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodisStarted
Return whether the server is currently started.
Public methodremoveStateListener
Remove a StateListener from this server. The listener will soon stop receiving updates.
Public methodrestart
Restarts the server synchronously, but only waiting for the specified timeout.
Public methodstart
Starts the server synchronously, but only waiting for the specified timeout.
Public methodstop
Stops the server.
Public methodToString (Overrides ObjectToString.)
Top
Remarks

DOFServer is associated with a DOF. It is able to create new connections based on inbound requests. These connections will be available to the DOF for communication. Each server created must be destroyed when it is no longer needed.

Constructing DOFServer:

DOFServer instances are constructed through the DOF with DOF.createServer(Config) or from an existing server with createServer(Config) .

Unicast servers require a unique transport address. Multicast servers are permitted to share a transport address for received packets but rely on their related unicast server to keep their sent traffic unique. For more information on properly creating multicast groups, see Type.DATAGRAM and Type.GROUP

See Also

Reference