public class DirectMemoryTransferTransportConnector extends AbstractTransportConnector
AbstractTransportConnector.AuthenticationConsumer| Modifier and Type | Field and Description |
|---|---|
static String |
NAME |
private static Map<String,List<DirectMemoryTransferTransportConnector>> |
subscriptions |
EMPTY_PARENT| Constructor and Description |
|---|
DirectMemoryTransferTransportConnector() |
| Modifier and Type | Method and Description |
|---|---|
void |
asyncSend(String stream,
Object data)
Sends the given
data on stream in asnychronous manner, e.g.,
by not blocking this call until the data is sent, i.e., sending may
not be completed when this method returns. |
void |
clear()
Clears everything.
|
String |
composeStreamName(String parent,
String name)
Composes a hierarchical stream name (in the syntax/semantics of the
connector).
|
String |
enabledEncryption()
Returns the actually enabled encryption mechanisms on this instance.
|
String |
getName()
Returns a descriptive name of the transport protocol being implemented.
|
void |
setReceptionCallback(String stream,
ReceptionCallback<?> callback)
Attaches a reception
callback to stream. |
String |
supportedEncryption()
Returns the supported encryption mechanisms.
|
void |
syncSend(String stream,
Object data)
Sends the given
data on stream in synchronized manner, e.g.,
by blocking this call until the data is sent. |
private <T> void |
transfer(String stream,
Object data)
Transfers
data to stream. |
void |
unsubscribe(String stream,
boolean delete)
Unsubscribes from a channel implicitly subscribed with
TransportConnector.setReceptionCallback(String, ReceptionCallback). |
applyAuthenticationKey, connect, detachReceptionCallback, disconnect, getActionTimeout, getApplicationId, getApplicationId, getCallback, getCloseAction, getKeystorePassword, getKeystorePassword, getTransportParameter, isStreamKnown, notifyCallback, registerStream, serializepublic static final String NAME
private static Map<String,List<DirectMemoryTransferTransportConnector>> subscriptions
public DirectMemoryTransferTransportConnector()
public void setReceptionCallback(String stream, ReceptionCallback<?> callback) throws IOException
TransportConnectorcallback to stream. The callback
is called upon a reception. Implicitly subscribes to channel.setReceptionCallback in interface TransportConnectorsetReceptionCallback in class AbstractTransportConnectorstream - the stream to attach the reception tocallback - the callback to attachIOException - in case that problems during registering the callback
(e.g., during subscription) happenspublic void unsubscribe(String stream, boolean delete) throws IOException
TransportConnectorTransportConnector.setReceptionCallback(String, ReceptionCallback).unsubscribe in interface TransportConnectorunsubscribe in class AbstractTransportConnectorstream - the stream to unsubscribe fromdelete - if true, try to delete/clean up the communication side on the server (may not be supported
by the implementing connector, is ignored then)IOException - if the action fails for some reasonpublic void syncSend(String stream, Object data) throws IOException
TransportConnectordata on stream in synchronized manner, e.g.,
by blocking this call until the data is sent.stream - the stream to send todata - the data to send to streamIOException - in case that problems during the connection happensprivate final <T> void transfer(String stream, Object data) throws IOException
data to stream.T - the type of datastream - the streamdata - the dataIOException - if the transfer failspublic void asyncSend(String stream, Object data) throws IOException
TransportConnectordata on stream in asnychronous manner, e.g.,
by not blocking this call until the data is sent, i.e., sending may
not be completed when this method returns. If not possible for this
connector, the underlying implementation may resort to synchronized sending.stream - the stream to send todata - the data to send to streamIOException - in case that problems during the connection happenspublic String composeStreamName(String parent, String name)
TransportConnectorparent - the parent name (may be TransportConnector.EMPTY_PARENT for top-level streams)name - the name of the streampublic String getName()
TransportConnectorpublic void clear()
public String supportedEncryption()
TransportConnectorpublic String enabledEncryption()
TransportConnectorCopyright © 2022. All rights reserved.