Class PrintTransportConnector
java.lang.Object
de.iip_ecosphere.platform.transport.connectors.impl.AbstractTransportConnector
de.iip_ecosphere.platform.transport.connectors.impl.PrintTransportConnector
- All Implemented Interfaces:
TransportConnector
A default print transport consumer for debugging.
- Author:
- Holger Eichelberger, SSE
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceConsumer for transport data.Nested classes/interfaces inherited from class de.iip_ecosphere.platform.transport.connectors.impl.AbstractTransportConnector
AbstractTransportConnector.AuthenticationConsumer -
Field Summary
FieldsFields 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.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.private voidSends data tostream.protected <T> byte[]Serializesdatatostream.voidChanges the transport/print consumer.Returns the supported encryption mechanisms.voidSends the givendataonstreamin synchronized manner, e.g., by blocking this call until thedatais sent.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, setReceptionCallback, setSerializerProvider, unsubscribe, useTls
-
Field Details
-
consumer
-
-
Constructor Details
-
PrintTransportConnector
public PrintTransportConnector()
-
-
Method Details
-
setTransportConsumer
Changes the transport/print consumer.- Parameters:
consumer- the new consumer, ignored if null
-
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
-
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
-
send
Sends data tostream.- Parameters:
stream- the stream to send todata- the data to send tostream- Throws:
IOException- in cases that sending fails
-
serialize
Description copied from class:AbstractTransportConnectorSerializesdatatostream. [helper]- Overrides:
serializein classAbstractTransportConnector- Type Parameters:
T- the type of the data- Parameters:
stream- the stream to serialize todata- the data to serialize- Returns:
- the serialized bytes
- Throws:
IOException- in case that problems occur during serialization
-
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
-
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
-