org.apache.camel.component.mina
Class MinaEndpoint

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

public class MinaEndpoint
extends DefaultEndpoint
implements MultipleConsumersSupport

Endpoint for Camel MINA.

Version:
$Revision: 21020 $

Field Summary
static String HEADER_LOCAL_ADDRESS
          Deprecated. 
static String HEADER_MINA_IOSESSION
          Deprecated. 
static String HEADER_REMOTE_ADDRESS
          Deprecated. 
 
Constructor Summary
MinaEndpoint()
           
MinaEndpoint(String endpointUri, MinaComponent component)
           
 
Method Summary
 Consumer createConsumer(Processor processor)
          Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor
 Exchange createExchange(org.apache.mina.common.IoSession session, Object payload)
           
 Producer createProducer()
          Creates a new producer which is used send messages into the endpoint
 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()
          Is multiple consumers supported?
 boolean isSingleton()
          Whether this class supports being singleton or not.
 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
configureProperties, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExchangePattern, getExchangeType, getId, hashCode, isLenientProperties, isSynchronous, sanitizeUri, setCamelContext, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setSynchronous, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

HEADER_MINA_IOSESSION

@Deprecated
public static final transient 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 transient 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 transient 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 Producer createProducer()
                        throws Exception
Description copied from interface: Endpoint
Creates a new producer which is used send messages into the endpoint

Specified by:
createProducer in interface Endpoint
Returns:
a newly created producer
Throws:
Exception - can be thrown

createConsumer

public Consumer createConsumer(Processor processor)
                        throws Exception
Description copied from interface: Endpoint
Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor

Specified by:
createConsumer in interface Endpoint
Parameters:
processor - the given processor
Returns:
a newly created consumer
Throws:
Exception - can be thrown

createExchange

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

isSingleton

public boolean isSingleton()
Description copied from interface: IsSingleton
Whether this class supports being singleton or not.

Specified by:
isSingleton in interface IsSingleton
Returns:
true to be a single shared instance, false to create new instances.

isMultipleConsumersSupported

public boolean isMultipleConsumersSupported()
Description copied from interface: MultipleConsumersSupport
Is multiple consumers supported?

Specified by:
isMultipleConsumersSupported in interface MultipleConsumersSupport
Returns:
true if multiple consumers is supported

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