public abstract static class DOF.Runtime
extends java.lang.Object
DOF.getRuntime()
Modifier and Type | Class and Description |
---|---|
static interface |
DOF.Runtime.ConnectionStateListener
The ConnectionStateListener interface, when implemented, enables you to receive notifications when any of this DOF's connections, either inbound
or outbound, are established or go down.
|
static interface |
DOF.Runtime.ServerStateListener
The ServerStateListener interface, when implemented, enables you to receive notifications when any of the DOF's servers
start or stop.
|
Constructor and Description |
---|
Runtime() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addConnectionListener(DOF.Runtime.ConnectionStateListener connectionStateListener)
Adds a
DOF.Runtime.ConnectionStateListener that is notified when connections are established or go down. |
abstract void |
addServerListener(DOF.Runtime.ServerStateListener serverStateListener)
Adds a
DOF.Runtime.ServerStateListener that is notified when servers are started or stopped. |
abstract short |
getConnectionCount()
Gets the total number of connections, both inbound and outbound, that are currently open.
|
abstract java.util.Collection<DOFConnection> |
getConnections()
Gets a collection of all connections, both inbound and outbound, that are currently open.
|
abstract int |
getProvideCount()
Gets the total number of provides currently active.
|
abstract java.util.Collection<DOFConnection> |
getProvidingConnections(DOFObjectID objectID,
DOFInterfaceID interfaceID)
Gets a collection of connections (
DOFConnection ), both inbound and outbound, over which a provide operation has been received for a specified DOFInterface
on a specified DOFObject . |
abstract short |
getServerCount()
Gets the total number of servers that are currently started.
|
abstract java.util.Collection<DOFServer> |
getServers()
Gets a collection of all servers that are currently started.
|
abstract DOF.TrafficStats |
getTrafficStats()
Returns a
DOF.TrafficStats object from which you can get traffic-related statistics for all connections and servers. |
abstract void |
removeConnectionListener(DOF.Runtime.ConnectionStateListener connectionStateListener)
Removes a previously added
DOF.Runtime.ConnectionStateListener . |
abstract void |
removeServerListener(DOF.Runtime.ServerStateListener serverStateListener)
Removes a previously added
DOF.Runtime.ServerStateListener . |
public abstract void addConnectionListener(DOF.Runtime.ConnectionStateListener connectionStateListener)
DOF.Runtime.ConnectionStateListener
that is notified when connections are established or go down.connectionStateListener
- The listener to add. This must not be null.removeConnectionListener(org.opendof.core.oal.DOF.Runtime.ConnectionStateListener)
public abstract void removeConnectionListener(DOF.Runtime.ConnectionStateListener connectionStateListener)
DOF.Runtime.ConnectionStateListener
. When the listener is removed, this method causes
DOF.Runtime.ConnectionStateListener.removed(org.opendof.core.oal.DOF.Runtime, org.opendof.core.oal.DOFException)
to be called.connectionStateListener
- The listener to remove. This must not be null.addConnectionListener(org.opendof.core.oal.DOF.Runtime.ConnectionStateListener)
public abstract void addServerListener(DOF.Runtime.ServerStateListener serverStateListener)
DOF.Runtime.ServerStateListener
that is notified when servers are started or stopped.serverStateListener
- The listener to add. This must not be null.removeServerListener(org.opendof.core.oal.DOF.Runtime.ServerStateListener)
public abstract void removeServerListener(DOF.Runtime.ServerStateListener serverStateListener)
DOF.Runtime.ServerStateListener
. When the listener is removed, this method causes
DOF.Runtime.ServerStateListener.removed(org.opendof.core.oal.DOF.Runtime, org.opendof.core.oal.DOFException)
to be called.serverStateListener
- The listener to remove. This must not be null.addServerListener(org.opendof.core.oal.DOF.Runtime.ServerStateListener)
public abstract java.util.Collection<DOFConnection> getProvidingConnections(DOFObjectID objectID, DOFInterfaceID interfaceID)
DOFConnection
), both inbound and outbound, over which a provide operation has been received for a specified DOFInterface
on a specified DOFObject
. In addition to specifying exact bindings, you can do the following:
DOFObjectID.BROADCAST
to get connections that are providing a specific interface on any object.DOFInterfaceID.WILDCARD
to get connections that are providing any interface on a specific object.objectID
- The object identifier. This must not be null.interfaceID
- The interface identifier. This must not be null.DOFObject.beginProvide(org.opendof.core.oal.DOFInterface, org.opendof.core.oal.DOFObject.Provider)
public abstract java.util.Collection<DOFConnection> getConnections()
getConnectionCount()
public abstract java.util.Collection<DOFServer> getServers()
getServerCount()
public abstract short getConnectionCount()
getConnections()
public abstract short getServerCount()
getServers()
public abstract int getProvideCount()
public abstract DOF.TrafficStats getTrafficStats()
DOF.TrafficStats
object from which you can get traffic-related statistics for all connections and servers.