Class CometdComponent
java.lang.Object
org.apache.camel.support.service.BaseService
org.apache.camel.support.service.ServiceSupport
org.apache.camel.support.DefaultComponent
org.apache.camel.component.cometd.CometdComponent
- All Implemented Interfaces:
AutoCloseable,org.apache.camel.CamelContextAware,org.apache.camel.Component,org.apache.camel.Service,org.apache.camel.ShutdownableService,org.apache.camel.spi.HasCamelContext,org.apache.camel.SSLContextParametersAware,org.apache.camel.StatefulService,org.apache.camel.SuspendableService
@Component("cometd,cometds")
public class CometdComponent
extends org.apache.camel.support.DefaultComponent
implements org.apache.camel.SSLContextParametersAware
Component for Jetty Cometd
-
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 -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExtension(org.cometd.bayeux.server.BayeuxServer.Extension extension) voidaddServerListener(org.cometd.bayeux.server.BayeuxServer.BayeuxServerListener serverListener) voidconnect(CometdProducerConsumer prodcon) Connects the URL specified on the endpoint to the specified processor.protected org.apache.camel.Endpointprotected org.eclipse.jetty.server.Serverprotected org.cometd.server.http.jakarta.CometDServletcreateServletForConnector(org.eclipse.jetty.server.Server server, CometdEndpoint endpoint) voiddisconnect(CometdProducerConsumer prodcon) Disconnects the URL specified on the endpoint from the specified processor.protected voiddoStop()List<org.cometd.bayeux.server.BayeuxServer.Extension> org.cometd.bayeux.server.SecurityPolicyorg.apache.camel.support.jsse.SSLContextParametersprotected org.eclipse.jetty.server.ServerConnectorgetSslSocketConnector(org.eclipse.jetty.server.Server server) booleanvoidsetExtensions(List<org.cometd.bayeux.server.BayeuxServer.Extension> extensions) To use a list of custom BayeuxServer.Extension that allows modifying incoming and outgoing requests.voidsetSecurityPolicy(org.cometd.bayeux.server.SecurityPolicy securityPolicy) To use a custom configured SecurityPolicy to control authorizationvoidsetSslContextParameters(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters) To configure security using SSLContextParametersvoidsetSslKeyPassword(String sslKeyPassword) The password for the keystore when using SSL.voidsetSslKeystore(String sslKeystore) The path to the keystore.voidsetSslPassword(String sslPassword) The password when using SSL.voidsetUseGlobalSslContextParameters(boolean useGlobalSslContextParameters) Enable usage of global SSL context parameters.Methods inherited from class org.apache.camel.support.DefaultComponent
afterConfiguration, createEndpoint, createEndpoint, doBuild, doInit, getAndRemoveOrResolveReferenceParameter, getAndRemoveOrResolveReferenceParameter, getAndRemoveParameter, getAndRemoveParameter, getCamelContext, getComponentPropertyConfigurer, getDefaultName, getEndpointPropertyConfigurer, getExtension, getSupportedExtensions, ifStartsWithReturnRemainder, isAutowiredEnabled, isBridgeErrorHandler, isLazyStartProducer, registerExtension, registerExtension, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceListParameter, resolveAndRemoveReferenceParameter, resolveAndRemoveReferenceParameter, resolveRawParameterValues, setAutowiredEnabled, setBridgeErrorHandler, setCamelContext, setLazyStartProducer, setProperties, setProperties, setProperties, useIntrospectionOnEndpoint, useRawUri, validateParameters, validateURIMethods inherited from class org.apache.camel.support.service.BaseService
build, doFail, doLifecycleChange, doResume, doShutdown, doStart, doSuspend, fail, getInternalLock, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.camel.CamelContextAware
setCamelContextMethods inherited from interface org.apache.camel.spi.HasCamelContext
getCamelContextMethods inherited from interface org.apache.camel.Service
build, close, init, start, stopMethods inherited from interface org.apache.camel.ShutdownableService
shutdownMethods inherited from interface org.apache.camel.SSLContextParametersAware
retrieveGlobalSslContextParametersMethods inherited from interface org.apache.camel.StatefulService
getStatus, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspendingMethods inherited from interface org.apache.camel.SuspendableService
isSuspended, resume, suspend
-
Constructor Details
-
CometdComponent
public CometdComponent()
-
-
Method Details
-
createEndpoint
protected org.apache.camel.Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception- Specified by:
createEndpointin classorg.apache.camel.support.DefaultComponent- Throws:
Exception
-
connect
Connects the URL specified on the endpoint to the specified processor.- Throws:
Exception
-
disconnect
Disconnects the URL specified on the endpoint from the specified processor.- Throws:
Exception
-
createServletForConnector
protected org.cometd.server.http.jakarta.CometDServlet createServletForConnector(org.eclipse.jetty.server.Server server, CometdEndpoint endpoint) throws Exception - Throws:
Exception
-
getSslSocketConnector
protected org.eclipse.jetty.server.ServerConnector getSslSocketConnector(org.eclipse.jetty.server.Server server) throws Exception - Throws:
Exception
-
getSslKeyPassword
-
getSslPassword
-
getSslKeystore
-
setSslKeyPassword
The password for the keystore when using SSL. -
setSslPassword
The password when using SSL. -
setSslKeystore
The path to the keystore. -
setSecurityPolicy
public void setSecurityPolicy(org.cometd.bayeux.server.SecurityPolicy securityPolicy) To use a custom configured SecurityPolicy to control authorization -
getSecurityPolicy
public org.cometd.bayeux.server.SecurityPolicy getSecurityPolicy() -
getExtensions
-
setExtensions
To use a list of custom BayeuxServer.Extension that allows modifying incoming and outgoing requests. -
addExtension
public void addExtension(org.cometd.bayeux.server.BayeuxServer.Extension extension) -
addServerListener
public void addServerListener(org.cometd.bayeux.server.BayeuxServer.BayeuxServerListener serverListener) -
getSslContextParameters
public org.apache.camel.support.jsse.SSLContextParameters getSslContextParameters() -
setSslContextParameters
public void setSslContextParameters(org.apache.camel.support.jsse.SSLContextParameters sslContextParameters) To configure security using SSLContextParameters -
isUseGlobalSslContextParameters
public boolean isUseGlobalSslContextParameters()- Specified by:
isUseGlobalSslContextParametersin interfaceorg.apache.camel.SSLContextParametersAware
-
setUseGlobalSslContextParameters
public void setUseGlobalSslContextParameters(boolean useGlobalSslContextParameters) Enable usage of global SSL context parameters.- Specified by:
setUseGlobalSslContextParametersin interfaceorg.apache.camel.SSLContextParametersAware
-
createServer
protected org.eclipse.jetty.server.Server createServer() -
doStop
- Overrides:
doStopin classorg.apache.camel.support.service.BaseService- Throws:
Exception
-