public class MockSinkModule<S extends Message,T extends Message> extends Object implements SinkModule<S,T>
Constructor and Description |
---|
MockSinkModule() |
Modifier and Type | Method and Description |
---|---|
AggregationPolicy<S,T,?> |
getAggregationPolicy()
Defines how messages should be combined, and when they
should be "released".
|
AsyncPolicy |
getAsyncPolicy()
Defines how messages should be asynchronously dispatched.
|
String |
getId()
Globally unique identifier.
|
int |
getNumConsumerThreads()
The number of threads used to consume from the broker.
|
byte[] |
marshal(T message)
Marshals the aggregated message to a byte array.
|
byte[] |
marshalSingleMessage(S message)
Marshals single message to a byte array.
|
T |
unmarshal(byte[] bytes)
Unmarshals the aggregated message from a byte array.
|
S |
unmarshalSingleMessage(byte[] message)
Unmarshals single message from a byte array.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRoutingKey
public String getId()
SinkModule
public int getNumConsumerThreads()
SinkModule
getNumConsumerThreads
in interface SinkModule<S extends Message,T extends Message>
public byte[] marshal(T message)
SinkModule
public T unmarshal(byte[] bytes)
SinkModule
public byte[] marshalSingleMessage(S message)
SinkModule
marshalSingleMessage
in interface SinkModule<S extends Message,T extends Message>
public S unmarshalSingleMessage(byte[] message)
SinkModule
unmarshalSingleMessage
in interface SinkModule<S extends Message,T extends Message>
public AggregationPolicy<S,T,?> getAggregationPolicy()
SinkModule
null
.getAggregationPolicy
in interface SinkModule<S extends Message,T extends Message>
AggregationPolicy
used to combine messages, or null
if the messages should not be combined.public AsyncPolicy getAsyncPolicy()
SinkModule
getAsyncPolicy
in interface SinkModule<S extends Message,T extends Message>
AsyncPolicy
used when asynchronously dispatching
messages for this module.Copyright © 2020. All rights reserved.