|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.servicemix.common.endpoints.AbstractEndpoint
org.apache.servicemix.common.endpoints.SimpleEndpoint
org.apache.servicemix.common.endpoints.ConsumerEndpoint
org.apache.servicemix.http.endpoints.HttpConsumerEndpoint
public class HttpConsumerEndpoint
Plain HTTP consumer endpoint. This endpoint can be used to handle plain HTTP request (without SOAP) or to be able to process the request in a non standard way. For HTTP requests, a WSDL2 HTTP binding can be used.
| Nested Class Summary | |
|---|---|
protected static class |
HttpConsumerEndpoint.LateResponseStrategy
Determines how the HTTP consumer endpoint should handle a late response from the NMR |
| Field Summary | |
|---|---|
static java.lang.String |
MAIN_WSDL
|
| Fields inherited from class org.apache.servicemix.common.endpoints.SimpleEndpoint |
|---|
logger |
| Fields inherited from class org.apache.servicemix.common.endpoints.AbstractEndpoint |
|---|
definition, description, endpoint, interfaceName, service, serviceUnit |
| Constructor Summary | |
|---|---|
HttpConsumerEndpoint()
|
|
HttpConsumerEndpoint(DefaultComponent component,
javax.jbi.servicedesc.ServiceEndpoint endpoint)
|
|
HttpConsumerEndpoint(ServiceUnit serviceUnit,
javax.xml.namespace.QName service,
java.lang.String endpoint)
|
|
| Method Summary | |
|---|---|
void |
activate()
|
protected void |
addResource(java.lang.String path,
java.lang.Object resource)
|
javax.jbi.messaging.MessageExchange |
createExchange(javax.servlet.http.HttpServletRequest request)
|
void |
deactivate()
|
java.lang.String |
getAuthMethod()
Returns a string describing the authentication scheme being used by an endpoint. |
java.net.URI |
getDefaultMep()
Returns a URI representing the default message exachange pattern(MEP) used by an endpoint. |
java.lang.String |
getLateResponseStrategy()
|
java.lang.String |
getLocationURI()
Returns the URI at which the endpoint listens for new requests. |
HttpConsumerMarshaler |
getMarshaler()
|
protected java.lang.Object |
getResource(java.lang.String path)
|
protected ContextManager |
getServerManager()
|
SslParameters |
getSsl()
|
long |
getTimeout()
Returns the timeout value for an HTTP endpoint. |
protected boolean |
handleStaticResource(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handle static resources |
boolean |
isRewriteSoapAddress()
|
protected void |
loadStaticResources()
|
void |
process(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
void |
process(javax.jbi.messaging.MessageExchange exchange)
|
void |
sendAccepted(javax.jbi.messaging.MessageExchange exchange,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
void |
sendError(javax.jbi.messaging.MessageExchange exchange,
java.lang.Exception error,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
void |
sendFault(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.Fault fault,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
void |
sendOut(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage outMsg,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
void |
setAuthMethod(java.lang.String authMethod)
Specifies the authentication method used by a secure endpoint. |
void |
setDefaultMep(java.net.URI defaultMep)
Sets the default message exchange pattern(MEP) for an endpoint. |
void |
setLateResponseStrategy(java.lang.String value)
Set the strategy to be used for handling a late response from the ESB (i.e. |
void |
setLocationURI(java.lang.String locationURI)
Sets the URI at which an endpoint listens for requests. |
void |
setMarshaler(HttpConsumerMarshaler marshaler)
Sets the class used to marshal messages. |
void |
setRewriteSoapAddress(boolean value)
Toggles the rewriting of the soap address based on the request info. |
void |
setSsl(SslParameters ssl)
Sets the properties used to configure SSL for the endpoint. |
void |
setTimeout(long timeout)
Specifies the timeout value for an HTTP consumer endpoint. |
void |
start()
|
void |
stop()
|
protected void |
updateSoapLocations(java.lang.String location,
org.w3c.dom.NodeList addresses)
|
void |
validate()
|
| Methods inherited from class org.apache.servicemix.common.endpoints.ConsumerEndpoint |
|---|
configureExchangeTarget, getRole, getTargetEndpoint, getTargetInterface, getTargetOperation, getTargetService, getTargetUri, setTargetEndpoint, setTargetInterface, setTargetOperation, setTargetService, setTargetUri |
| Methods inherited from class org.apache.servicemix.common.endpoints.SimpleEndpoint |
|---|
done, fail, getChannel, getContext, getExchangeFactory, send, sendSync |
| Methods inherited from class org.apache.servicemix.common.endpoints.AbstractEndpoint |
|---|
getDefinition, getDescription, getEndpoint, getInterfaceName, getKey, getService, getServiceUnit, isExchangeOkay, prepareExchange, setDefinition, setDescription, setEndpoint, setInterfaceName, setService, setServiceUnit, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String MAIN_WSDL
| Constructor Detail |
|---|
public HttpConsumerEndpoint()
public HttpConsumerEndpoint(DefaultComponent component,
javax.jbi.servicedesc.ServiceEndpoint endpoint)
public HttpConsumerEndpoint(ServiceUnit serviceUnit,
javax.xml.namespace.QName service,
java.lang.String endpoint)
| Method Detail |
|---|
public java.lang.String getLocationURI()
getLocationURI in class ConsumerEndpointpublic void setLocationURI(java.lang.String locationURI)
locationURI - a string representing the URIpublic long getTimeout()
public void setTimeout(long timeout)
timeout - the length time, in milliseconds, to wait before timing outpublic HttpConsumerMarshaler getMarshaler()
public void setMarshaler(HttpConsumerMarshaler marshaler)
marshaler - the marshaler to setpublic java.lang.String getAuthMethod()
getAuthMethod in interface HttpProcessorpublic void setAuthMethod(java.lang.String authMethod)
authMethod - a string naming the authentication scheme a secure endpoint should usepublic SslParameters getSsl()
getSsl in interface HttpProcessorpublic void setSsl(SslParameters ssl)
ssl - an SslParameters object containing the SSL propertiespublic java.net.URI getDefaultMep()
public void setDefaultMep(java.net.URI defaultMep)
JbiConstants.IN_OUT.
defaultMep - a URI representing the default MEP of the endpointpublic java.lang.String getLateResponseStrategy()
public void setLateResponseStrategy(java.lang.String value)
error
error will terminate the exchange with an ERROR status and log an exception for the late responsewarning will end the exchange with a DONE status and log a warning for the late response instead
value - public boolean isRewriteSoapAddress()
public void setRewriteSoapAddress(boolean value)
When active, the soap address in the wsdl will be updated according
to the protocol, host and port of the request. This is useful when
listening on 0.0.0.0 or when behind a NAT (or reverse-proxy in some
cases).
This function only works on the main wsdl, not in imported wsdl-parts.
This means the service with its port must be declared in the main
wsdl.
By default it is activated.
value -
public void activate()
throws java.lang.Exception
activate in interface Endpointactivate in class ConsumerEndpointjava.lang.Exception
public void deactivate()
throws java.lang.Exception
deactivate in interface Endpointdeactivate in class ConsumerEndpointjava.lang.Exception
public void start()
throws java.lang.Exception
start in interface Endpointstart in class SimpleEndpointjava.lang.Exception
public void stop()
throws java.lang.Exception
stop in interface Endpointstop in class SimpleEndpointjava.lang.Exception
public void process(javax.jbi.messaging.MessageExchange exchange)
throws java.lang.Exception
process in interface Endpointprocess in class AbstractEndpointjava.lang.Exception
public void process(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
process in interface HttpProcessorjava.lang.Exception
protected void loadStaticResources()
throws java.lang.Exception
java.lang.Exception
protected boolean handleStaticResource(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
request - the http requestresponse - the http response
true if the request has been handled
java.io.IOException
javax.servlet.ServletExceptionprotected java.lang.Object getResource(java.lang.String path)
protected void addResource(java.lang.String path,
java.lang.Object resource)
protected ContextManager getServerManager()
public javax.jbi.messaging.MessageExchange createExchange(javax.servlet.http.HttpServletRequest request)
throws java.lang.Exception
java.lang.Exception
public void sendAccepted(javax.jbi.messaging.MessageExchange exchange,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
java.lang.Exception
public void sendError(javax.jbi.messaging.MessageExchange exchange,
java.lang.Exception error,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
java.lang.Exception
public void sendFault(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.Fault fault,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
java.lang.Exception
public void sendOut(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage outMsg,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.lang.Exception
java.lang.Exception
public void validate()
throws javax.jbi.management.DeploymentException
validate in interface Endpointvalidate in class ConsumerEndpointjavax.jbi.management.DeploymentException
protected void updateSoapLocations(java.lang.String location,
org.w3c.dom.NodeList addresses)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||