org.apache.servicemix.http
Class HttpEndpoint

java.lang.Object
  extended by org.apache.servicemix.common.endpoints.AbstractEndpoint
      extended by org.apache.servicemix.soap.SoapEndpoint
          extended by org.apache.servicemix.http.HttpEndpoint
All Implemented Interfaces:
Endpoint, HttpEndpointType

public class HttpEndpoint
extends SoapEndpoint
implements HttpEndpointType

an HTTP endpoint. This is the base for all HTTP endpoints.

Version:
$Revision$
Author:
gnodet

Field Summary
protected  java.lang.String authMethod
           
protected  BasicAuthCredentials basicAuthentication
           
protected  javax.wsdl.extensions.ExtensibilityElement binding
           
protected  java.lang.String locationURI
           
protected  ProxyParameters proxy
           
protected  boolean responseContentTypeCheck
           
protected  java.lang.String soapAction
           
protected  SslParameters ssl
           
protected  boolean synchronous
           
protected  int timeout
           
protected  boolean wantContentTypeHeaderFromExchangeIntoHttpRequest
           
 
Fields inherited from class org.apache.servicemix.soap.SoapEndpoint
activated, defaultMep, defaultOperation, dynamic, policies, processor, role, soap, soapVersion, targetEndpoint, targetInterfaceName, targetService, wsdlResource, wsdls
 
Fields inherited from class org.apache.servicemix.common.endpoints.AbstractEndpoint
definition, description, endpoint, interfaceName, logger, service, serviceUnit
 
Constructor Summary
HttpEndpoint()
           
HttpEndpoint(boolean dynamic)
           
 
Method Summary
protected  SoapExchangeProcessor createConsumerProcessor()
           
protected  javax.jbi.servicedesc.ServiceEndpoint createExternalEndpoint()
           
protected  SoapExchangeProcessor createProviderProcessor()
           
protected  javax.jbi.management.DeploymentException failure(java.lang.String task, java.lang.String info, java.lang.Throwable e)
           
 AuthenticationService getAuthenticationService()
           
 java.lang.String getAuthMethod()
          Returns a string describing the authentication scheme being used by an endpoint.
 BasicAuthCredentials getBasicAuthentication()
          Gets the authentication data used for provider endpoints using basic authentication.
 javax.wsdl.extensions.ExtensibilityElement getBinding()
           
 KeystoreManager getKeystoreManager()
           
 java.lang.String getLocationURI()
          Returns the URI to which the endpoint sends requests.
 ProxyParameters getProxy()
           
 java.lang.String getSoapAction()
           
 SslParameters getSsl()
           
protected  javax.wsdl.PortType getTargetPortType(javax.wsdl.Definition def)
           
 int getTimeout()
          Returns the timeout value for an HTTP endpoint.
 boolean isResponseContentTypeCheck()
           
 boolean isSynchronous()
           
 boolean isWantContentTypeHeaderFromExchangeIntoHttpRequest()
          Determines if the HTTP provider processor copies the HTTP headers from the HTTP response into the JBI exchange.
protected  void overrideDefinition(javax.wsdl.Definition def)
           
 void reloadWsdl()
           
 void setAuthMethod(java.lang.String authMethod)
          Specifies the authentication method used by a secure endpoint.
 void setBasicAuthentication(BasicAuthCredentials basicAuthCredentials)
          Sets the authentication data used for provider endpoints using basic authentication.
 void setBinding(javax.wsdl.extensions.ExtensibilityElement binding)
           
 void setLocationURI(java.lang.String locationUri)
          Sets the URI to which an endpoint sends requests.
 void setProxy(ProxyParameters proxy)
          Sets the configuration information for the proxy used by a HTTP consumer endpoint.
 void setResponseContentTypeCheck(boolean responseContentTypeCheck)
          Specifies if the http provider checks the response content type for the keyword xml.
 void setRoleAsString(java.lang.String role)
          Sets the endpoint's role.
 void setSoapAction(java.lang.String soapAction)
           
 void setSsl(SslParameters ssl)
          Sets the properties used to configure SSL for the endpoint.
 void setSynchronous(boolean synchronous)
           
 void setTimeout(int timeout)
          Specifies the timeout value for an HTTP endpoint.
 void setWantContentTypeHeaderFromExchangeIntoHttpRequest(boolean wantContentTypeHeaderFromExchangeIntoHttpRequest)
          Specifies if the HTTP provider processor copies the HTTP headers from the HTTP response into the JBI exchange.
 void validate()
           
 
Methods inherited from class org.apache.servicemix.soap.SoapEndpoint
activate, createWsdlReader, createWsdlWriter, deactivate, getDefaultMep, getDefaultOperation, getPolicies, getRole, getSoapVersion, getTargetEndpoint, getTargetInterfaceName, getTargetService, getWsdlResource, getWsdls, isSoap, loadWsdl, mapDefinition, mapImports, process, registerExtensions, retrieveProxiedEndpointDefinition, setDefaultMep, setDefaultOperation, setDescription, setPolicies, setRole, setSoap, setSoapVersion, setTargetEndpoint, setTargetInterfaceName, setTargetService, setWsdlResource, start, stop
 
Methods inherited from class org.apache.servicemix.common.endpoints.AbstractEndpoint
getDefinition, getDescription, getEndpoint, getInterfaceName, getKey, getService, getServiceUnit, isExchangeOkay, prepareExchange, setDefinition, setEndpoint, setInterfaceName, setService, setServiceUnit, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

binding

protected javax.wsdl.extensions.ExtensibilityElement binding

locationURI

protected java.lang.String locationURI

ssl

protected SslParameters ssl

authMethod

protected java.lang.String authMethod

soapAction

protected java.lang.String soapAction

basicAuthentication

protected BasicAuthCredentials basicAuthentication

proxy

protected ProxyParameters proxy

synchronous

protected boolean synchronous

wantContentTypeHeaderFromExchangeIntoHttpRequest

protected boolean wantContentTypeHeaderFromExchangeIntoHttpRequest

timeout

protected int timeout

responseContentTypeCheck

protected boolean responseContentTypeCheck
Constructor Detail

HttpEndpoint

public HttpEndpoint()

HttpEndpoint

public HttpEndpoint(boolean dynamic)
Method Detail

isWantContentTypeHeaderFromExchangeIntoHttpRequest

public boolean isWantContentTypeHeaderFromExchangeIntoHttpRequest()
Determines if the HTTP provider processor copies the HTTP headers from the HTTP response into the JBI exchange.

Returns:
true if the HTTP headers will be copied into the exchange

setWantContentTypeHeaderFromExchangeIntoHttpRequest

public void setWantContentTypeHeaderFromExchangeIntoHttpRequest(boolean wantContentTypeHeaderFromExchangeIntoHttpRequest)
Specifies if the HTTP provider processor copies the HTTP headers from the HTTP response into the JBI exchange. If the headers will be used for a new HTTP reuquest, setting this to true leads to an error.

Parameters:
wantContentTypeHeaderFromExchangeIntoHttpRequest - true if the HTTP headers will be copied into the exchange

isResponseContentTypeCheck

public boolean isResponseContentTypeCheck()
Returns:
true it the http provider checks the content type agains the keyword xml

setResponseContentTypeCheck

public void setResponseContentTypeCheck(boolean responseContentTypeCheck)
Specifies if the http provider checks the response content type for the keyword xml. If it is true the provider will throw an exception if the content type does not contain the word xml. This should avoid that non valid xml is received by the provider endpoint and set as normalize message. Because the target expect to get an valid xml.

Parameters:
responseContentTypeCheck -

isSynchronous

public boolean isSynchronous()
Returns:
the synchronous

setSynchronous

public void setSynchronous(boolean synchronous)
Parameters:
synchronous - the synchronous to set

getSoapAction

public java.lang.String getSoapAction()
Returns:
the soapAction

setSoapAction

public void setSoapAction(java.lang.String soapAction)
Parameters:
soapAction - the soapAction to set

getAuthMethod

public java.lang.String getAuthMethod()
Returns a string describing the authentication scheme being used by an endpoint.

Returns:
a string representing the authentication method used by an endpoint

setAuthMethod

public void setAuthMethod(java.lang.String authMethod)
Specifies the authentication method used by a secure endpoint. The authentication method is a string naming the scheme used for authenticating users.

Parameters:
authMethod - a string naming the authentication scheme a secure endpoint should use

getSsl

public SslParameters getSsl()
Returns:
Returns the ssl.

setSsl

public void setSsl(SslParameters ssl)
Sets the properties used to configure SSL for the endpoint.

Parameters:
ssl - an SslParameters object containing the SSL properties

getBinding

public javax.wsdl.extensions.ExtensibilityElement getBinding()

setBinding

public void setBinding(javax.wsdl.extensions.ExtensibilityElement binding)

getLocationURI

public java.lang.String getLocationURI()
Returns the URI to which the endpoint sends requests.

Returns:
a string representing the URI to which requests are sent

setLocationURI

public void setLocationURI(java.lang.String locationUri)
Sets the URI to which an endpoint sends requests.

Parameters:
locationUri - a string representing the URI

setBasicAuthentication

public void setBasicAuthentication(BasicAuthCredentials basicAuthCredentials)
Sets the authentication data used for provider endpoints using basic authentication.

Parameters:
basicAuthCredentials - the BasicAuthCredentials that will be used for authentication

getBasicAuthentication

public BasicAuthCredentials getBasicAuthentication()
Gets the authentication data used for provider endpoints using basic authentication.

Returns:
the BasicAuthCredentials to use for authentication

getProxy

public ProxyParameters getProxy()
Returns:
Returns the proxy.

setProxy

public void setProxy(ProxyParameters proxy)
Sets the configuration information for the proxy used by a HTTP consumer endpoint. This configuration overrides the proxy configuraiton specified at the component level.

Parameters:
proxy - The proxy to set.

setRoleAsString

public void setRoleAsString(java.lang.String role)
Sets the endpoint's role. HTTP endpoints can be either consumers or providers. Specifying consumer for the role defines the endpoint as a consumer which exposes an endpoint at a URL. Specifying provider for the role defines the endpoint as a provider that sends HTTP requests to a URL.

Overrides:
setRoleAsString in class SoapEndpoint
Parameters:
role - a string specifying the role of the endpoint

setTimeout

public void setTimeout(int timeout)
Specifies the timeout value for an HTTP endpoint. The timeout is specified in milliseconds. The default value is 0 which means that the endpoint will never timeout.

Parameters:
timeout - the length time, in milliseconds, to wait before timing out

getTimeout

public int getTimeout()
Returns the timeout value for an HTTP endpoint.

Returns:
the timeout specified in milliseconds

reloadWsdl

public void reloadWsdl()

getTargetPortType

protected javax.wsdl.PortType getTargetPortType(javax.wsdl.Definition def)

overrideDefinition

protected void overrideDefinition(javax.wsdl.Definition def)
                           throws java.lang.Exception
Specified by:
overrideDefinition in class SoapEndpoint
Throws:
java.lang.Exception

createProviderProcessor

protected SoapExchangeProcessor createProviderProcessor()
Specified by:
createProviderProcessor in class SoapEndpoint

createConsumerProcessor

protected SoapExchangeProcessor createConsumerProcessor()
Specified by:
createConsumerProcessor in class SoapEndpoint

createExternalEndpoint

protected javax.jbi.servicedesc.ServiceEndpoint createExternalEndpoint()
Specified by:
createExternalEndpoint in class SoapEndpoint

getAuthenticationService

public AuthenticationService getAuthenticationService()
Overrides:
getAuthenticationService in class SoapEndpoint

getKeystoreManager

public KeystoreManager getKeystoreManager()
Overrides:
getKeystoreManager in class SoapEndpoint

validate

public void validate()
              throws javax.jbi.management.DeploymentException
Specified by:
validate in interface Endpoint
Overrides:
validate in class AbstractEndpoint
Throws:
javax.jbi.management.DeploymentException

failure

protected javax.jbi.management.DeploymentException failure(java.lang.String task,
                                                           java.lang.String info,
                                                           java.lang.Throwable e)


Copyright © 2005-2012 FuseSource. All Rights Reserved.