public abstract class AbstractSimpleTransport extends AbstractTransport
deliverMessageTowardsTransport(Message)
,
and calling HostSide.sendBatchTowardsHost(List)
to send messages in the other direction.
Subclasses should provide a constructor with the same signature as
AbstractSimpleTransport(org.slf4j.Logger, PluginConstructorParameters.TransportConstructorParameters)
.
hostSide
chainId, config, CONNECTIVITY_API_VERSION, host, logger, pluginName
Constructor and Description |
---|
AbstractSimpleTransport(org.slf4j.Logger logger,
PluginConstructorParameters.TransportConstructorParameters params)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
deliverMessageTowardsTransport(Message message)
Deliver an individual non-null message.
|
void |
deliverNullPayloadTowardsTransport(Message message)
Deliver an individual null-payload message.
|
void |
handleException(java.lang.Exception ex,
Message message,
boolean towardsTransport)
Handle exception thrown from delivering messages.
|
void |
sendBatchTowardsTransport(java.util.List<Message> messages)
Deliver a batch of messages and pass them on to the next
plug-in synchronously.
|
hostReady, setNextTowardsHost, shutdown, start, toString
getStatusReporter
public AbstractSimpleTransport(org.slf4j.Logger logger, PluginConstructorParameters.TransportConstructorParameters params) throws java.lang.IllegalArgumentException, java.lang.Exception
logger
- a slf4j Logger object which can be used to log to the host log file.params
- an extensible interface providing access to the configuration for this plug-in and other
capabilities.java.lang.IllegalArgumentException
- should be thrown from a plug-in's constructor if
the configuration is invalid.java.lang.Exception
- can be thrown to indicate an internal error.public void sendBatchTowardsTransport(java.util.List<Message> messages)
If the transport can deliver multiple events in a batch more efficiently, then it should override this method.
public abstract void deliverMessageTowardsTransport(Message message) throws java.lang.Exception
java.lang.Exception
public void deliverNullPayloadTowardsTransport(Message message) throws java.lang.Exception
java.lang.Exception
public void handleException(java.lang.Exception ex, Message message, boolean towardsTransport)
Submit a bug or feature
Copyright (c) 2013-2020 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors. Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.