public class RoleInputConsumerWrapper extends java.lang.Object implements ForkliftConsumerI
role messages.
RoleInputSources to be
backed by any arbitrary source.| Constructor and Description |
|---|
RoleInputConsumerWrapper(ForkliftConsumerI consumer)
Creates a consumer that delegates message retrieval to the
given consumer and maps whatever the consumer outputs based on the
assumption that all of the messages returned from the given consumer
were serialized as
RoleInputMessages. |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closees the underlying consumer.
|
ForkliftMessage |
receive(long timeout)
Delegates to the underlying consumer, and tries to extract a role message
from any received messages.
|
public RoleInputConsumerWrapper(ForkliftConsumerI consumer)
RoleInputMessages.consumer - the consumer to get unmapped messages frompublic ForkliftMessage receive(long timeout) throws ConnectorException
receive in interface ForkliftConsumerItimeout - the timeout of the underlying consumerConnectorException - if a connector error occurs in the underlying consumerpublic void close()
throws ConnectorException
close in interface ForkliftConsumerIConnectorException - if a connector error occurs in the underlying consumer