public interface TransportConnector
| Modifier and Type | Field and Description |
|---|---|
static String |
EMPTY_PARENT
Empty stream parent.
|
| 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. |
String |
composeStreamName(String parent,
String name)
Composes a hierarchical stream name (in the syntax/semantics of the
connector).
|
void |
connect(TransportParameter params)
Connects the underlying connections.
|
void |
detachReceptionCallback(String stream,
ReceptionCallback<?> callback)
Detaches a reception
callback to stream. |
void |
disconnect()
Disconnects the underlying connections.
|
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. |
void |
unsubscribe(String stream,
boolean delete)
Unsubscribes from a channel implicitly subscribed with
setReceptionCallback(String, ReceptionCallback). |
static final String EMPTY_PARENT
void syncSend(String stream, Object data) throws IOException
data 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 happensvoid asyncSend(String stream, Object data) throws IOException
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. 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 happensvoid setReceptionCallback(String stream, ReceptionCallback<?> callback) throws IOException
callback to stream. The callback
is called upon a reception. Implicitly subscribes to channel.stream - the stream to attach the reception tocallback - the callback to attachIOException - in case that problems during registering the callback
(e.g., during subscription) happensvoid detachReceptionCallback(String stream, ReceptionCallback<?> callback) throws IOException
callback to stream.stream - the stream to detach the reception callback fromcallback - the callback to detachIOException - in case that problems during detaching the callbackvoid unsubscribe(String stream, boolean delete) throws IOException
setReceptionCallback(String, ReceptionCallback).stream - 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 reasonString composeStreamName(String parent, String name)
parent - the parent name (may be EMPTY_PARENT for top-level streams)name - the name of the streamIllegalArgumentException - in case that the stream name is (structurally) illegalvoid connect(TransportParameter params) throws IOException
params - the parameters to start the underlying connectionIOException - in case that problems during the connection happensvoid disconnect()
throws IOException
Unsubscribes on all known
subscribed depending on
TransportParameter.getCloseAction().IOException - in case that problems during the disconnect happensString getName()
String supportedEncryption()
String enabledEncryption()
Copyright © 2022. All rights reserved.