org.apache.camel.component.mina
Class MinaEndpoint

java.lang.Object
  extended by org.apache.camel.support.ServiceSupport
      extended by org.apache.camel.impl.DefaultEndpoint
          extended by org.apache.camel.component.mina.MinaEndpoint
All Implemented Interfaces:
org.apache.camel.CamelContextAware, org.apache.camel.Endpoint, org.apache.camel.IsSingleton, org.apache.camel.MultipleConsumersSupport, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.HasId, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

public class MinaEndpoint
extends org.apache.camel.impl.DefaultEndpoint
implements org.apache.camel.MultipleConsumersSupport

Endpoint for Camel MINA.

Version:

Field Summary
static String HEADER_LOCAL_ADDRESS
          Deprecated. 
static String HEADER_MINA_IOSESSION
          Deprecated. 
static String HEADER_REMOTE_ADDRESS
          Deprecated. 
 
Fields inherited from class org.apache.camel.support.ServiceSupport
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
 
Constructor Summary
MinaEndpoint()
           
MinaEndpoint(String endpointUri, MinaComponent component)
           
 
Method Summary
protected  void addThreadPool(ExecutorService executorService)
          Add thread pool which are in-use, we need to un-register when shutting down.
 org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor)
           
 org.apache.camel.Exchange createExchange(org.apache.mina.common.IoSession session, Object payload)
           
 org.apache.camel.Producer createProducer()
           
protected  void doShutdown()
           
 org.apache.mina.common.IoAcceptor getAcceptor()
           
 org.apache.mina.common.IoAcceptorConfig getAcceptorConfig()
           
 SocketAddress getAddress()
           
 MinaConfiguration getConfiguration()
           
 org.apache.mina.common.IoConnector getConnector()
           
 org.apache.mina.common.IoConnectorConfig getConnectorConfig()
           
 boolean isMultipleConsumersSupported()
           
 boolean isSingleton()
           
 void setAcceptor(org.apache.mina.common.IoAcceptor acceptor)
           
 void setAcceptorConfig(org.apache.mina.common.IoAcceptorConfig acceptorConfig)
           
 void setAddress(SocketAddress address)
           
 void setConfiguration(MinaConfiguration configuration)
           
 void setConnector(org.apache.mina.common.IoConnector connector)
           
 void setConnectorConfig(org.apache.mina.common.IoConnectorConfig connectorConfig)
           
 
Methods inherited from class org.apache.camel.impl.DefaultEndpoint
configureConsumer, configurePollingConsumer, configureProperties, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, doStart, doStop, equals, getCamelContext, getComponent, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExchangePattern, getId, hashCode, isLenientProperties, isSynchronous, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setProperties, setSynchronous, toString
 
Methods inherited from class org.apache.camel.support.ServiceSupport
doResume, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, 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.Service
start, stop
 

Field Detail

HEADER_MINA_IOSESSION

@Deprecated
public static final String HEADER_MINA_IOSESSION
Deprecated. 
The key of the IoSession which is stored in the message header

See Also:
Constant Field Values

HEADER_LOCAL_ADDRESS

@Deprecated
public static final String HEADER_LOCAL_ADDRESS
Deprecated. 
The socket address of local machine that received the message.

See Also:
Constant Field Values

HEADER_REMOTE_ADDRESS

@Deprecated
public static final String HEADER_REMOTE_ADDRESS
Deprecated. 
The socket address of the remote machine that send the message.

See Also:
Constant Field Values
Constructor Detail

MinaEndpoint

public MinaEndpoint()

MinaEndpoint

public MinaEndpoint(String endpointUri,
                    MinaComponent component)
Method Detail

createProducer

public org.apache.camel.Producer createProducer()
                                         throws Exception
Specified by:
createProducer in interface org.apache.camel.Endpoint
Throws:
Exception

createConsumer

public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor)
                                         throws Exception
Specified by:
createConsumer in interface org.apache.camel.Endpoint
Throws:
Exception

createExchange

public org.apache.camel.Exchange createExchange(org.apache.mina.common.IoSession session,
                                                Object payload)

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface org.apache.camel.IsSingleton

isMultipleConsumersSupported

public boolean isMultipleConsumersSupported()
Specified by:
isMultipleConsumersSupported in interface org.apache.camel.MultipleConsumersSupport

doShutdown

protected void doShutdown()
                   throws Exception
Overrides:
doShutdown in class org.apache.camel.support.ServiceSupport
Throws:
Exception

addThreadPool

protected void addThreadPool(ExecutorService executorService)
Add thread pool which are in-use, we need to un-register when shutting down.


getConfiguration

public MinaConfiguration getConfiguration()

setConfiguration

public void setConfiguration(MinaConfiguration configuration)

getAddress

public SocketAddress getAddress()

setAddress

public void setAddress(SocketAddress address)

getAcceptor

public org.apache.mina.common.IoAcceptor getAcceptor()

setAcceptor

public void setAcceptor(org.apache.mina.common.IoAcceptor acceptor)

getConnector

public org.apache.mina.common.IoConnector getConnector()

setConnector

public void setConnector(org.apache.mina.common.IoConnector connector)

getAcceptorConfig

public org.apache.mina.common.IoAcceptorConfig getAcceptorConfig()

setAcceptorConfig

public void setAcceptorConfig(org.apache.mina.common.IoAcceptorConfig acceptorConfig)

getConnectorConfig

public org.apache.mina.common.IoConnectorConfig getConnectorConfig()

setConnectorConfig

public void setConnectorConfig(org.apache.mina.common.IoConnectorConfig connectorConfig)


Apache Camel