Class AbstractRabbitMQConsumer
- java.lang.Object
-
- io.gridgo.framework.AbstractComponentLifecycle
-
- io.gridgo.connector.impl.AbstractConsumer
-
- io.gridgo.connector.rabbitmq.impl.AbstractRabbitMQConsumer
-
- All Implemented Interfaces:
io.gridgo.connector.Consumer,RabbitMQChannelLifeCycle,RabbitMQConsumer,io.gridgo.framework.ComponentLifecycle,io.gridgo.utils.helper.Loggable,io.gridgo.utils.helper.Startable
- Direct Known Subclasses:
DefaultRabbitMQConsumer
public abstract class AbstractRabbitMQConsumer extends io.gridgo.connector.impl.AbstractConsumer implements RabbitMQConsumer
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractRabbitMQConsumer(io.gridgo.connector.support.config.ConnectorContext context, com.rabbitmq.client.Connection connection, RabbitMQQueueConfig queueConfig, java.lang.String uniqueIdentifier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.joo.promise4j.Deferred<io.gridgo.framework.support.Message,java.lang.Exception>createDeferred()protected java.lang.StringgenerateName()com.rabbitmq.client.ChannelgetChannel()RabbitMQQueueConfiggetQueueConfig()protected java.lang.StringgetUniqueIdentifier()protected voidonStart()protected voidonStop()-
Methods inherited from class io.gridgo.connector.impl.AbstractConsumer
clearSubscribers, createMessage, createMessage, createMessage, ensurePayloadId, ensurePayloadId, getContext, getSubscribers, parseMessage, parseMessage, parseMessage, parseMessage, publish, subscribe
-
Methods inherited from class io.gridgo.framework.AbstractComponentLifecycle
getName, isStarted, start, stop, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.gridgo.connector.Consumer
clearSubscribers, subscribe, subscribe
-
Methods inherited from interface io.gridgo.connector.rabbitmq.RabbitMQChannelLifeCycle
closeChannel, initChannel
-
Methods inherited from interface io.gridgo.connector.rabbitmq.RabbitMQConsumer
subscibe
-
-
-
-
Constructor Detail
-
AbstractRabbitMQConsumer
protected AbstractRabbitMQConsumer(io.gridgo.connector.support.config.ConnectorContext context, @NonNull com.rabbitmq.client.Connection connection, @NonNull RabbitMQQueueConfig queueConfig, @NonNull java.lang.String uniqueIdentifier)
-
-
Method Detail
-
createDeferred
protected org.joo.promise4j.Deferred<io.gridgo.framework.support.Message,java.lang.Exception> createDeferred()
-
generateName
protected java.lang.String generateName()
- Specified by:
generateNamein classio.gridgo.framework.AbstractComponentLifecycle
-
onStart
protected void onStart()
- Specified by:
onStartin classio.gridgo.framework.AbstractComponentLifecycle
-
onStop
protected void onStop()
- Specified by:
onStopin classio.gridgo.framework.AbstractComponentLifecycle
-
getQueueConfig
public RabbitMQQueueConfig getQueueConfig()
- Specified by:
getQueueConfigin interfaceRabbitMQChannelLifeCycle
-
getChannel
public com.rabbitmq.client.Channel getChannel()
- Specified by:
getChannelin interfaceRabbitMQChannelLifeCycle
-
getUniqueIdentifier
protected java.lang.String getUniqueIdentifier()
-
-