Class DirectMemoryTransferTransportConnector
java.lang.Object
de.iip_ecosphere.platform.transport.connectors.impl.AbstractTransportConnector
de.iip_ecosphere.platform.transport.connectors.impl.DirectMemoryTransferTransportConnector
- All Implemented Interfaces:
TransportConnector
Does a direct memory transfer.
- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested classes/interfaces inherited from class de.iip_ecosphere.platform.transport.connectors.impl.AbstractTransportConnector
AbstractTransportConnector.AuthenticationConsumer -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprivate static Map<String, List<DirectMemoryTransferTransportConnector>> Fields inherited from interface de.iip_ecosphere.platform.transport.connectors.TransportConnector
EMPTY_PARENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidSends the givendataonstreamin asnychronous manner, e.g., by not blocking this call until thedatais sent, i.e., sending may not be completed when this method returns.voidclear()Clears everything.composeStreamName(String parent, String name) Composes a hierarchical stream name (in the syntax/semantics of the connector).Returns the actually enabled encryption mechanisms on this instance.getName()Returns a descriptive name of the transport protocol being implemented.voidsetReceptionCallback(String stream, ReceptionCallback<?> callback) Attaches a receptioncallbacktostream.Returns the supported encryption mechanisms.voidSends the givendataonstreamin synchronized manner, e.g., by blocking this call until thedatais sent.private final <T> voidTransfersdatatostream.voidunsubscribe(String stream, boolean delete) Unsubscribes from a channel implicitly subscribed withTransportConnector.setReceptionCallback(String, ReceptionCallback).Methods inherited from class de.iip_ecosphere.platform.transport.connectors.impl.AbstractTransportConnector
applyAuthenticationKey, applyAuthenticationKey, applyIdentityToken, applyIdentityToken, connect, createTlsContext, detachReceptionCallback, disconnect, getActionTimeout, getApplicationId, getApplicationId, getCallback, getCloseAction, getSerializerProvider, getTransportParameter, isStreamKnown, notifyCallback, registerStream, serialize, setSerializerProvider, useTls
-
Field Details
-
NAME
- See Also:
-
subscriptions
-
-
Constructor Details
-
DirectMemoryTransferTransportConnector
public DirectMemoryTransferTransportConnector()
-
-
Method Details
-
setReceptionCallback
Description copied from interface:TransportConnectorAttaches a receptioncallbacktostream. Thecallbackis called upon a reception. Implicitly subscribes tochannel.- Specified by:
setReceptionCallbackin interfaceTransportConnector- Overrides:
setReceptionCallbackin classAbstractTransportConnector- Parameters:
stream- the stream to attach the reception tocallback- the callback to attach- Throws:
IOException- in case that problems during registering the callback (e.g., during subscription) happens
-
unsubscribe
Description copied from interface:TransportConnectorUnsubscribes from a channel implicitly subscribed withTransportConnector.setReceptionCallback(String, ReceptionCallback).- Specified by:
unsubscribein interfaceTransportConnector- Overrides:
unsubscribein classAbstractTransportConnector- Parameters:
stream- the stream to unsubscribe fromdelete- iftrue, try to delete/clean up the communication side on the server (may not be supported by the implementing connector, is ignored then)- Throws:
IOException- if the action fails for some reason
-
syncSend
Description copied from interface:TransportConnectorSends the givendataonstreamin synchronized manner, e.g., by blocking this call until thedatais sent.- Parameters:
stream- the stream to send todata- the data to send tostream- Throws:
IOException- in case that problems during the connection happens
-
transfer
Transfersdatatostream.- Type Parameters:
T- the type of data- Parameters:
stream- the streamdata- the data- Throws:
IOException- if the transfer fails
-
asyncSend
Description copied from interface:TransportConnectorSends the givendataonstreamin asnychronous manner, e.g., by not blocking this call until thedatais 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.- Parameters:
stream- the stream to send todata- the data to send tostream- Throws:
IOException- in case that problems during the connection happens
-
composeStreamName
Description copied from interface:TransportConnectorComposes a hierarchical stream name (in the syntax/semantics of the connector).- Parameters:
parent- the parent name (may beTransportConnector.EMPTY_PARENTfor top-level streams)name- the name of the stream- Returns:
- the composed name
-
getName
Description copied from interface:TransportConnectorReturns a descriptive name of the transport protocol being implemented.- Returns:
- the name of the protocol
-
clear
public void clear()Clears everything. -
supportedEncryption
Description copied from interface:TransportConnectorReturns the supported encryption mechanisms.- Returns:
- the supported encryption mechanisms (comma-separated), may be null or empty
-
enabledEncryption
Description copied from interface:TransportConnectorReturns the actually enabled encryption mechanisms on this instance. The result may change when connecting the connector.- Returns:
- the enabled encryption mechanisms (comma-separated), may be null or empty
-