org.apache.servicemix.http
Class HttpComponent
java.lang.Object
org.apache.servicemix.common.AsyncBaseLifeCycle
org.apache.servicemix.common.DefaultComponent
org.apache.servicemix.http.HttpComponent
- All Implemented Interfaces:
- javax.jbi.component.Component, javax.jbi.component.ComponentLifeCycle, org.apache.servicemix.common.ServiceMixComponent
public class HttpComponent
- extends org.apache.servicemix.common.DefaultComponent
an HTTP JBI component
- Author:
- gnodet
| Fields inherited from class org.apache.servicemix.common.DefaultComponent |
lifeCycle, logger, registry, serviceUnit, serviceUnitManager |
| Fields inherited from class org.apache.servicemix.common.AsyncBaseLifeCycle |
channel, component, container, context, correlationId, currentState, executor, executorFactory, INITIALIZED, knownExchanges, mbeanName, poller, polling, running, transactionManager, workManagerCreated |
| Methods inherited from class org.apache.servicemix.common.DefaultComponent |
addEndpoint, asList, createRegistry, getComponentContext, getComponentName, getEPRElementName, getEPRServiceName, getLifeCycle, getLogger, getRegistry, getServiceDescription, getServiceUnit, getServiceUnitManager, isExchangeWithConsumerOkay, isExchangeWithProviderOkay, isKnownEndpoint, removeEndpoint, resolveEndpointReference, validateEndpoint |
| Methods inherited from class org.apache.servicemix.common.AsyncBaseLifeCycle |
createExecutorFactory, createExtensionMBeanName, exceptionShouldRollbackTx, findExecutorFactory, getContainer, getContext, getCurrentState, getExecutor, getExecutorFactory, getExtensionMBeanName, getKnownExchanges, getSmx3Container, handleExchange, init, isInitialized, isShutDown, isStarted, isStopped, isUnknown, onMessageExchange, pollDeliveryChannel, prepareExchange, prepareShutdown, processExchange, processExchangeInTx, setComponent, setCurrentState, setExecutor, setExecutorFactory, shutDown, start, stop |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.servicemix.common.ServiceMixComponent |
getContainer, getExecutor, getSmx3Container, handleExchange, prepareExchange, prepareShutdown |
EPR_PROTOCOLS
public static final String[] EPR_PROTOCOLS
server
protected ContextManager server
client
protected org.apache.commons.httpclient.HttpClient client
connectionManager
protected org.apache.commons.httpclient.MultiThreadedHttpConnectionManager connectionManager
connectionPool
protected org.mortbay.jetty.client.HttpClient connectionPool
configuration
protected HttpConfiguration configuration
endpoints
protected HttpEndpointType[] endpoints
protocol
protected String protocol
host
protected String host
port
protected int port
path
protected String path
HttpComponent
public HttpComponent()
getHost
public String getHost()
- Returns the host name.
- Returns:
- a string contianing the host name
setHost
public void setHost(String host)
- Sets the host name.
- Parameters:
host - a string specifying the host name
getPath
public String getPath()
- Returns:
- the path
setPath
public void setPath(String path)
- Parameters:
path - the path to set
getPort
public int getPort()
- Returns:
- the port
setPort
public void setPort(int port)
- Parameters:
port - the port to set
getProtocol
public String getProtocol()
- Returns:
- the protocol
setProtocol
public void setProtocol(String protocol)
- Parameters:
protocol - the protocol to set
getEndpoints
public HttpEndpointType[] getEndpoints()
- Returns:
- the endpoints
setEndpoints
public void setEndpoints(HttpEndpointType[] endpoints)
- Parameters:
endpoints - the endpoints to set
getServer
public ContextManager getServer()
setServer
public void setServer(ContextManager server)
getClient
public org.apache.commons.httpclient.HttpClient getClient()
setClient
public void setClient(org.apache.commons.httpclient.HttpClient client)
- Parameters:
client - the HTTP client instance used by the component
getConnectionPool
public org.mortbay.jetty.client.HttpClient getConnectionPool()
createNewJettyClient
public org.mortbay.jetty.client.HttpClient createNewJettyClient()
throws Exception
- Throws:
Exception
setConnectionPool
public void setConnectionPool(org.mortbay.jetty.client.HttpClient connectionPool)
- Sets the connection pool used by the component. The connection pool is a Jetty HTTP client instance with a thread pool set
using the HTTP component's
jettyClientThreadPoolSize property.
- Parameters:
connectionPool - a Jetty HttpClient
getConfiguration
public HttpConfiguration getConfiguration()
- Returns:
- Returns the configuration.
setConfiguration
public void setConfiguration(HttpConfiguration configuration)
- Parameters:
configuration - an HttpConfiguration object containing the configuration information needed to establish
HTTP connections
getExtensionMBean
protected Object getExtensionMBean()
throws Exception
- Overrides:
getExtensionMBean in class org.apache.servicemix.common.AsyncBaseLifeCycle
- Throws:
Exception
doInit
protected void doInit()
throws Exception
- Overrides:
doInit in class org.apache.servicemix.common.DefaultComponent
- Throws:
Exception
doShutDown
protected void doShutDown()
throws Exception
- Overrides:
doShutDown in class org.apache.servicemix.common.DefaultComponent
- Throws:
Exception
doStart
protected void doStart()
throws Exception
- Overrides:
doStart in class org.apache.servicemix.common.DefaultComponent
- Throws:
Exception
doStop
protected void doStop()
throws Exception
- Overrides:
doStop in class org.apache.servicemix.common.DefaultComponent
- Throws:
Exception
getEPRProtocols
protected String[] getEPRProtocols()
- Overrides:
getEPRProtocols in class org.apache.servicemix.common.DefaultComponent
getResolvedEPR
protected org.apache.servicemix.common.Endpoint getResolvedEPR(javax.jbi.servicedesc.ServiceEndpoint ep)
throws Exception
- Overrides:
getResolvedEPR in class org.apache.servicemix.common.AsyncBaseLifeCycle
- Throws:
Exception
getKeystoreManager
public Object getKeystoreManager()
- Returns:
- the keystoreManager
setKeystoreManager
public void setKeystoreManager(Object keystoreManager)
- Parameters:
keystoreManager - the keystoreManager to set
getAuthenticationService
public Object getAuthenticationService()
- Returns:
- the authenticationService
setAuthenticationService
public void setAuthenticationService(Object authenticationService)
- Parameters:
authenticationService - the authenticationService to set
getMainProcessor
public HttpProcessor getMainProcessor()
- When servicemix-http is embedded inside a web application and configured to reuse the existing servlet container, this method
will create and return the HTTPProcessor which will handle all servlet calls
createServiceUnitManager
public org.apache.servicemix.common.BaseServiceUnitManager createServiceUnitManager()
- Overrides:
createServiceUnitManager in class org.apache.servicemix.common.DefaultComponent
getConfiguredEndpoints
protected List getConfiguredEndpoints()
- Overrides:
getConfiguredEndpoints in class org.apache.servicemix.common.DefaultComponent
getEndpointClasses
protected Class[] getEndpointClasses()
- Overrides:
getEndpointClasses in class org.apache.servicemix.common.DefaultComponent
Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.