Class JGroupsEndpoint
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultEndpoint
org.apache.camel.component.jgroups.JGroupsEndpoint
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.CamelContextAware,org.apache.camel.ComponentAware,org.apache.camel.Endpoint,org.apache.camel.IsSingleton,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.HasCamelContext,org.apache.camel.spi.HasId,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
@UriEndpoint(firstVersion="2.13.0",
scheme="jgroups",
title="JGroups",
syntax="jgroups:clusterName",
category={CLUSTERING,MESSAGING},
headersClass=JGroupsConstants.class)
public class JGroupsEndpoint
extends org.apache.camel.support.DefaultEndpoint
Exchange messages with JGroups clusters.
-
Field Summary
Fields inherited from class org.apache.camel.support.service.BaseService
BUILT, FAILED, INITIALIZED, INITIALIZING, lock, NEW, SHUTDOWN, SHUTTING_DOWN, STARTED, STARTING, status, STOPPED, STOPPING, SUSPENDED, SUSPENDING -
Constructor Summary
ConstructorsConstructorDescriptionJGroupsEndpoint(String endpointUri, org.apache.camel.Component component, org.jgroups.JChannel channel, String clusterName, String channelProperties, boolean enableViewMessages) -
Method Summary
Modifier and TypeMethodDescriptionvoidconnect()Connect shared channel, called by producer and consumer.org.apache.camel.ConsumercreateConsumer(org.apache.camel.Processor processor) org.apache.camel.Exchangeorg.apache.camel.ExchangecreateExchange(org.jgroups.Message message) org.apache.camel.ExchangecreateExchange(org.jgroups.View view) org.apache.camel.ProducervoidDisconnect shared channel, called by producer and consumer.protected voiddoStart()protected voiddoStop()org.jgroups.JChannelbooleanvoidsetChannel(org.jgroups.JChannel channel) The channel to usevoidsetChannelProperties(String channelProperties) Specifies configuration properties of the JChannel used by the endpoint.voidsetClusterName(String clusterName) The name of the JGroups cluster the component should connect to.voidsetEnableViewMessages(boolean enableViewMessages) If set to true, the consumer endpoint will receive org.jgroups.View messages as well (not only org.jgroups.Message instances).Methods inherited from class org.apache.camel.support.DefaultEndpoint
configureConsumer, configureExchange, configurePollingConsumer, configureProperties, createAsyncProducer, createEndpointUri, createExchange, createPollingConsumer, doInit, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, isLenientProperties, isPollingConsumerBlockWhenFull, isPollingConsumerCopy, isSingleton, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setComponent, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setLazyStartProducer, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerCopy, setPollingConsumerQueueSize, setProperties, toStringMethods inherited from class org.apache.camel.support.service.BaseService
build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.camel.ComponentAware
getComponentMethods inherited from interface org.apache.camel.Endpoint
getEndpointBaseUri, isRemote, isSingletonProducerMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
JGroupsEndpoint
-
-
Method Details
-
createProducer
- Throws:
Exception
-
createConsumer
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception - Throws:
Exception
-
createExchange
public org.apache.camel.Exchange createExchange(org.jgroups.Message message) -
createExchange
public org.apache.camel.Exchange createExchange(org.jgroups.View view) -
createExchange
public org.apache.camel.Exchange createExchange()- Specified by:
createExchangein interfaceorg.apache.camel.Endpoint- Overrides:
createExchangein classorg.apache.camel.support.DefaultEndpoint
-
doStart
- Overrides:
doStartin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
doStop
- Overrides:
doStopin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-
connect
Connect shared channel, called by producer and consumer.- Throws:
Exception
-
disconnect
public void disconnect()Disconnect shared channel, called by producer and consumer. -
getChannel
public org.jgroups.JChannel getChannel() -
setChannel
public void setChannel(org.jgroups.JChannel channel) The channel to use -
getClusterName
-
setClusterName
The name of the JGroups cluster the component should connect to. -
getChannelProperties
-
setChannelProperties
Specifies configuration properties of the JChannel used by the endpoint. -
isEnableViewMessages
public boolean isEnableViewMessages() -
setEnableViewMessages
public void setEnableViewMessages(boolean enableViewMessages) If set to true, the consumer endpoint will receive org.jgroups.View messages as well (not only org.jgroups.Message instances). By default only regular messages are consumed by the endpoint.
-