Class HttpRequestService
- java.lang.Object
-
- com.adaptris.core.ServiceImp
-
- com.adaptris.core.http.client.net.HttpRequestServiceImpl
-
- com.adaptris.core.http.client.net.HttpRequestService
-
- All Implemented Interfaces:
AdaptrisComponent
,ComponentLifecycle
,ComponentLifecycleExtension
,DynamicPollingTemplate.TemplateProvider
,MessageEventGenerator
,Service
,StateManagedComponent
@ComponentProfile(summary="Make a HTTP request to a remote server using standard JRE components", tag="service,http,https", metadata="adphttpresponse") public class HttpRequestService extends HttpRequestServiceImpl implements DynamicPollingTemplate.TemplateProvider
Direct HTTP support as a service rather wrapped viaStandaloneProducer
orStandaloneRequestor
.Note that this service just wraps a
StandardHttpProducer
instance but doesn't expose all the possible settings available for the normalStandardHttpProducer
. If you need those features, than continue using the producer wrapped as aStandaloneProducer
orStandaloneRequestor
.String parameters in this service will use the
InterlokMessage.resolve(String)
which allows you to specify metadata values as part of a constant string e.g.setUrl("%message{http_url}")
will use the metadata value associated with the keyhttp_url
.In the adapter configuration file this class is aliased as http-request-service which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.ServiceImp
log
-
-
Constructor Summary
Constructors Constructor Description HttpRequestService()
HttpRequestService(java.lang.String url)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doService(AdaptrisMessage msg)
Apply the service to the message.-
Methods inherited from class com.adaptris.core.http.client.net.HttpRequestServiceImpl
buildProducer, closeService, getAuthenticator, getContentType, getMethod, getRequestHeaderProvider, getResponseHeaderHandler, getUrl, initService, prepare, setAuthenticator, setContentType, setMethod, setRequestHeaderProvider, setResponseHeaderHandler, setUrl, withAuthenticator, withContentType, withMethod, withRequestHeaderProvider, withResponseHeaderHandler, withUrl
-
Methods inherited from class com.adaptris.core.ServiceImp
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId, start, stop
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.AdaptrisComponent
getUniqueId
-
Methods inherited from interface com.adaptris.core.ComponentLifecycle
close, init, start, stop
-
Methods inherited from interface com.adaptris.core.ComponentLifecycleExtension
prepare
-
Methods inherited from interface com.adaptris.core.MessageEventGenerator
createName, createQualifier, isTrackingEndpoint
-
Methods inherited from interface com.adaptris.core.Service
continueOnFailure, isBranching, setUniqueId
-
Methods inherited from interface com.adaptris.core.StateManagedComponent
changeState, requestClose, requestInit, requestStart, requestStop, retrieveComponentState
-
-
-
-
Method Detail
-
doService
public void doService(AdaptrisMessage msg) throws ServiceException
Description copied from interface:Service
Apply the service to the message.
- Specified by:
doService
in interfaceService
- Parameters:
msg
- theAdaptrisMessage
to process- Throws:
ServiceException
- wrapping any underlyingException
s
-
-