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

    Constructors
    Constructor
    Description
    JGroupsEndpoint(String endpointUri, org.apache.camel.Component component, org.jgroups.JChannel channel, String clusterName, String channelProperties, boolean enableViewMessages)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Connect shared channel, called by producer and consumer.
    org.apache.camel.Consumer
    createConsumer(org.apache.camel.Processor processor)
     
    org.apache.camel.Exchange
     
    org.apache.camel.Exchange
    createExchange(org.jgroups.Message message)
     
    org.apache.camel.Exchange
    createExchange(org.jgroups.View view)
     
    org.apache.camel.Producer
     
    void
    Disconnect shared channel, called by producer and consumer.
    protected void
     
    protected void
     
    org.jgroups.JChannel
     
     
     
    boolean
     
    void
    setChannel(org.jgroups.JChannel channel)
    The channel to use
    void
    setChannelProperties(String channelProperties)
    Specifies configuration properties of the JChannel used by the endpoint.
    void
    setClusterName(String clusterName)
    The name of the JGroups cluster the component should connect to.
    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).

    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, toString

    Methods inherited from class org.apache.camel.support.service.BaseService

    build, doBuild, doFail, doLifecycleChange, doResume, doShutdown, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.camel.ComponentAware

    getComponent

    Methods inherited from interface org.apache.camel.Endpoint

    getEndpointBaseUri, isSingletonProducer

    Methods inherited from interface org.apache.camel.Service

    build, close, init, start, stop

    Methods inherited from interface org.apache.camel.ShutdownableService

    shutdown

    Methods inherited from interface org.apache.camel.StatefulService

    getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspending

    Methods inherited from interface org.apache.camel.SuspendableService

    isSuspended, resume, suspend
  • Constructor Details

    • JGroupsEndpoint

      public JGroupsEndpoint(String endpointUri, org.apache.camel.Component component, org.jgroups.JChannel channel, String clusterName, String channelProperties, boolean enableViewMessages)
  • Method Details

    • createProducer

      public org.apache.camel.Producer createProducer() throws Exception
      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:
      createExchange in interface org.apache.camel.Endpoint
      Overrides:
      createExchange in class org.apache.camel.support.DefaultEndpoint
    • doStart

      protected void doStart() throws Exception
      Overrides:
      doStart in class org.apache.camel.support.service.BaseService
      Throws:
      Exception
    • doStop

      protected void doStop() throws Exception
      Overrides:
      doStop in class org.apache.camel.support.service.BaseService
      Throws:
      Exception
    • connect

      public void connect() throws Exception
      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

      public String getClusterName()
    • setClusterName

      public void setClusterName(String clusterName)
      The name of the JGroups cluster the component should connect to.
    • getChannelProperties

      public String getChannelProperties()
    • setChannelProperties

      public void setChannelProperties(String channelProperties)
      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.