org.apache.camel.component.mina2
Class Mina2Consumer

java.lang.Object
  extended by org.apache.camel.support.ServiceSupport
      extended by org.apache.camel.impl.DefaultConsumer
          extended by org.apache.camel.component.mina2.Mina2Consumer
All Implemented Interfaces:
org.apache.camel.Consumer, org.apache.camel.RouteAware, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

public class Mina2Consumer
extends org.apache.camel.impl.DefaultConsumer

A Consumer implementation for Apache MINA.

Version:

Field Summary
 
Fields inherited from class org.apache.camel.impl.DefaultConsumer
log
 
Fields inherited from class org.apache.camel.support.ServiceSupport
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
 
Constructor Summary
Mina2Consumer(Mina2Endpoint endpoint, org.apache.camel.Processor processor)
           
 
Method Summary
protected  void configureCodecFactory(String type, org.apache.mina.core.service.IoService service, Mina2Configuration configuration)
           
protected  void configureDataGramCodecFactory(String type, org.apache.mina.core.service.IoService service, Mina2Configuration configuration)
          For datagrams the entire message is available as a single IoBuffer so lets just pass those around by default and try converting whatever they payload is into IoBuffer unless some custom converter is specified
protected  void configureDefaultCodecFactory(String type, org.apache.mina.core.service.IoService service, Mina2Configuration configuration)
           
protected  void doShutdown()
           
protected  void doStart()
           
protected  void doStop()
           
 org.apache.mina.core.service.IoAcceptor getAcceptor()
           
 Mina2Endpoint getEndpoint()
           
 void setAcceptor(org.apache.mina.core.service.IoAcceptor acceptor)
           
protected  void setupDatagramProtocol(String uri, Mina2Configuration configuration)
           
protected  void setupSocketProtocol(String uri, Mina2Configuration configuration)
           
protected  void setupVmProtocol(String uri, Mina2Configuration configuration)
           
 
Methods inherited from class org.apache.camel.impl.DefaultConsumer
createUoW, doneUoW, getAsyncProcessor, getExceptionHandler, getProcessor, getRoute, handleException, handleException, setExceptionHandler, setRoute, 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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Constructor Detail

Mina2Consumer

public Mina2Consumer(Mina2Endpoint endpoint,
                     org.apache.camel.Processor processor)
              throws Exception
Throws:
Exception
Method Detail

doStart

protected void doStart()
                throws Exception
Overrides:
doStart in class org.apache.camel.impl.DefaultConsumer
Throws:
Exception

doStop

protected void doStop()
               throws Exception
Overrides:
doStop in class org.apache.camel.impl.DefaultConsumer
Throws:
Exception

doShutdown

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

setupVmProtocol

protected void setupVmProtocol(String uri,
                               Mina2Configuration configuration)

setupSocketProtocol

protected void setupSocketProtocol(String uri,
                                   Mina2Configuration configuration)
                            throws Exception
Throws:
Exception

configureCodecFactory

protected void configureCodecFactory(String type,
                                     org.apache.mina.core.service.IoService service,
                                     Mina2Configuration configuration)

configureDefaultCodecFactory

protected void configureDefaultCodecFactory(String type,
                                            org.apache.mina.core.service.IoService service,
                                            Mina2Configuration configuration)

setupDatagramProtocol

protected void setupDatagramProtocol(String uri,
                                     Mina2Configuration configuration)

configureDataGramCodecFactory

protected void configureDataGramCodecFactory(String type,
                                             org.apache.mina.core.service.IoService service,
                                             Mina2Configuration configuration)
For datagrams the entire message is available as a single IoBuffer so lets just pass those around by default and try converting whatever they payload is into IoBuffer unless some custom converter is specified


getEndpoint

public Mina2Endpoint getEndpoint()
Specified by:
getEndpoint in interface org.apache.camel.Consumer
Overrides:
getEndpoint in class org.apache.camel.impl.DefaultConsumer

getAcceptor

public org.apache.mina.core.service.IoAcceptor getAcceptor()

setAcceptor

public void setAcceptor(org.apache.mina.core.service.IoAcceptor acceptor)


Apache Camel