Package org.somda.sdc.dpws.device.helper
Class RequestResponseServerHttpHandler
java.lang.Object
org.somda.sdc.dpws.device.helper.RequestResponseServerHttpHandler
- All Implemented Interfaces:
HttpHandler,InterceptorHandler
public class RequestResponseServerHttpHandler
extends Object
implements HttpHandler, InterceptorHandler
RequestResponseServer that is invoked on SOAP HttpHandler callbacks.
The handler is an InterceptorHandler.
All objects registered via register(Interceptor) receive the requests delivered to
HttpHandler.handle(InputStream, OutputStream, CommunicationContext).
-
Method Summary
Modifier and TypeMethodDescriptionvoidhandle(InputStream inStream, OutputStream outStream, CommunicationContext communicationContext) Callback that is invoked byHttpServerRegistrywhenever a respective context path is matched.voidregister(Interceptor interceptor) Registers a callback object.
-
Method Details
-
handle
public void handle(InputStream inStream, OutputStream outStream, CommunicationContext communicationContext) throws HttpException Description copied from interface:HttpHandlerCallback that is invoked byHttpServerRegistrywhenever a respective context path is matched.- Specified by:
handlein interfaceHttpHandler- Parameters:
inStream- stream of the incoming SOAP request. The caller is responsible for closing the stream.outStream- stream of the outgoing SOAP response. The caller is responsible for closing the stream.communicationContext- information from the transport and application layer, e.g., local address, local port, certificate data etc.- Throws:
HttpException- if there is a SOAP fault thrown that is supposed to cause the HTTP layer to attach a status code other than 200. If the exception includes a message, then the caller is supposed to put the text to the HTTP response. If the exception does not include a message (length is 0), then the caller is supposed to put the outStream content to the HTTP response.
-
register
Description copied from interface:InterceptorHandlerRegisters a callback object.- Specified by:
registerin interfaceInterceptorHandler- Parameters:
interceptor- an object that possessesMessageInterceptorannotated methods.- See Also:
-