org.apache.camel.component.netty
Class NettyEndpoint

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

public class NettyEndpoint
extends org.apache.camel.impl.DefaultEndpoint


Field Summary
 
Fields inherited from class org.apache.camel.support.ServiceSupport
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
 
Constructor Summary
NettyEndpoint(String endpointUri, NettyComponent component, NettyConfiguration configuration)
           
 
Method Summary
 org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor)
           
protected  String createEndpointUri()
           
 org.apache.camel.Exchange createExchange(org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent messageEvent)
           
 org.apache.camel.Producer createProducer()
           
protected  void doStart()
           
protected  void enrichWithClientCertInformation(SSLSession sslSession, org.apache.camel.Message message)
          Enriches the message with client certificate details such as subject name, serial number etc.
 NettyComponent getComponent()
           
 NettyConfiguration getConfiguration()
           
protected  SSLSession getSSLSession(org.jboss.netty.channel.ChannelHandlerContext ctx)
           
 org.jboss.netty.util.Timer getTimer()
           
 boolean isSingleton()
           
 void setConfiguration(NettyConfiguration configuration)
           
 void setTimer(org.jboss.netty.util.Timer timer)
           
protected  void updateMessageHeader(org.apache.camel.Message in, org.jboss.netty.channel.ChannelHandlerContext ctx, org.jboss.netty.channel.MessageEvent messageEvent)
           
 
Methods inherited from class org.apache.camel.impl.DefaultEndpoint
configureConsumer, configurePollingConsumer, configureProperties, createEndpointConfiguration, createExchange, createExchange, createExchange, createPollingConsumer, doStop, equals, getCamelContext, 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, doShutdown, 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
 

Constructor Detail

NettyEndpoint

public NettyEndpoint(String endpointUri,
                     NettyComponent component,
                     NettyConfiguration configuration)
Method Detail

createConsumer

public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor)
                                         throws Exception
Throws:
Exception

createProducer

public org.apache.camel.Producer createProducer()
                                         throws Exception
Throws:
Exception

createExchange

public org.apache.camel.Exchange createExchange(org.jboss.netty.channel.ChannelHandlerContext ctx,
                                                org.jboss.netty.channel.MessageEvent messageEvent)
                                         throws Exception
Throws:
Exception

isSingleton

public boolean isSingleton()

getComponent

public NettyComponent getComponent()
Overrides:
getComponent in class org.apache.camel.impl.DefaultEndpoint

getConfiguration

public NettyConfiguration getConfiguration()

setConfiguration

public void setConfiguration(NettyConfiguration configuration)

setTimer

public void setTimer(org.jboss.netty.util.Timer timer)

getTimer

public org.jboss.netty.util.Timer getTimer()

createEndpointUri

protected String createEndpointUri()
Overrides:
createEndpointUri in class org.apache.camel.impl.DefaultEndpoint

doStart

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

getSSLSession

protected SSLSession getSSLSession(org.jboss.netty.channel.ChannelHandlerContext ctx)

updateMessageHeader

protected void updateMessageHeader(org.apache.camel.Message in,
                                   org.jboss.netty.channel.ChannelHandlerContext ctx,
                                   org.jboss.netty.channel.MessageEvent messageEvent)

enrichWithClientCertInformation

protected void enrichWithClientCertInformation(SSLSession sslSession,
                                               org.apache.camel.Message message)
Enriches the message with client certificate details such as subject name, serial number etc.

If the certificate is unverified then the headers is not enriched.

Parameters:
sslSession - the SSL session
message - the message to enrich


Apache Camel