public static interface DOFConnection.StreamRequestListener
DOFConnection.Type.DATAGRAM connection to a
DOFConnection.Type.STREAM type.| Modifier and Type | Method and Description |
|---|---|
void |
streamRequest(DOFConnection.Config config,
DOFConnection.StreamRequest request)
Informs the listener that a
DOFConnection.Type.STREAM connection has been requested, based on
current DOFInterestLevel.CONNECT-level interest and matching provided bindings. |
void |
streamRequestComplete(DOFConnection.Config config,
DOFConnection.StreamRequest request)
Inform the listener that a previously requested
DOFConnection.Type.STREAM connection is no longer being requested,
based on a lack of current DOFInterestLevel.CONNECT-level interest and/or lack of matching provided bindings. |
void streamRequest(DOFConnection.Config config, DOFConnection.StreamRequest request)
DOFConnection.Type.STREAM connection has been requested, based on
current DOFInterestLevel.CONNECT-level interest and matching provided bindings.config - The configuration on which the listener was set (including actual credentials), so that a secure
DOFConnection.Type.STREAM connection could be made from an existing secure
DOFConnection.Type.DATAGRAM connection’s config). This configuration would
typically be modified using the builder to create a new configuration appropriate for a streaming
version of this connection.
For example, an application might call
newConfig = new DOFConnection.Config.Builder(config)
.setConnectionType(DOFConnection.Type.STREAM)
.setAddress(targetAddress)
.build();
to create a STREAM connection from a DATAGRAM connection’s config.request - An object representing the request for the DOFConnection.Type.STREAM connection. This request has
several pieces of useful information that the application may need to establish the correct connection.
Specifically, it contains the following:
DOFAddress.Type.UNICAST,
as opposed to the address in the connection config which may not be appropriate (e.g.,
DOFAddress.Type.MULTICAST, DOFAddress.Type.BROADCAST, or DOFGroupAddress.DOFConnection.Type.DATAGRAM connection (for which a DOFConnection.Type.STREAM connection should be opened) or on
a STREAM connection (which needs to be kept open, and possibly monitored, to satisfy the request).streamRequestComplete(org.opendof.core.oal.DOFConnection.Config, org.opendof.core.oal.DOFConnection.StreamRequest),
DOFInterestLevel,
DOFConnection.StreamRequestvoid streamRequestComplete(DOFConnection.Config config, DOFConnection.StreamRequest request)
DOFConnection.Type.STREAM connection is no longer being requested,
based on a lack of current DOFInterestLevel.CONNECT-level interest and/or lack of matching provided bindings.config - The connection configuration on which the listener was set.request - The same object representing the request for the DOFConnection.Type.STREAM connection (as was passed
to the streamRequest(org.opendof.core.oal.DOFConnection.Config, org.opendof.core.oal.DOFConnection.StreamRequest) call previously).