01: /*
02: * ChainBuilder ESB
03: * Visual Enterprise Integration
04: *
05: * Copyright (C) 2007 Bostech Corporation
06: *
07: * This program is free software; you can redistribute it and/or modify it
08: * under the terms of the GNU General Public License as published by the
09: * Free Software Foundation; either version 2 of the License, or (at your option)
10: * any later version.
11: *
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14: * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15: * for more details.
16: *
17: * You should have received a copy of the GNU General Public License along with
18: * this program; if not, write to the Free Software Foundation, Inc.,
19: * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20: *
21: *
22: * $Id: IHttpProviderMarshaller.java 8973 2007-09-07 01:29:55Z mpreston $
23: */
24: package com.bostechcorp.cbesb.runtime.ccsl.lib;
25:
26: import javax.jbi.messaging.Fault;
27: import javax.jbi.messaging.MessageExchange;
28: import javax.jbi.messaging.MessagingException;
29: import javax.jbi.messaging.NormalizedMessage;
30:
31: import com.bostechcorp.cbesb.runtime.ccsl.jbi.messaging.ServiceDescriptionHandler;
32:
33: /**
34: * IHttpProviderMarshaller is used by the HTTP component in provider non-soap
35: * mode to convert from a NormalizedMessage into an IHttpRequest object and to
36: * convert IHttpResponse into a NormalizedMessage.
37: */
38: public interface IHttpProviderMarshaller {
39:
40: /**
41: * Converts from the 'in' NormalizedMessage of a MessageExchange
42: * into an IHttpRequest.
43: * @param message The NormalizedMessage
44: * @param httpRequest The IHttpRequest to populate
45: * @param msgExchange The MessageExchange that contains message
46: */
47: public void NormalizedMessageToHttpRequest(
48: NormalizedMessage message, IHttpRequest httpRequest,
49: MessageExchange msgExchange) throws MessagingException;
50:
51: /**
52: * Converts from an IHttpResponse into the 'out' message of an
53: * In-Out MessageExchange.
54: * @param httpResponse The IHttpResponse
55: * @param message The NormalizedMessage to populate
56: * @param msgExchange The MessageExchange that contains message
57: * @param svcDescHandler The component's ServiceDescriptionHandler
58: * that can be used by NormalizedMessageHandler to form a JBI
59: * WSDL 1.1 wrapper message.
60: */
61: public void HttpResponseToNormalizedMessage(
62: IHttpResponse httpResponse, NormalizedMessage message,
63: MessageExchange msgExchange,
64: ServiceDescriptionHandler svcDescHandler)
65: throws MessagingException;
66:
67: /**
68: * Converts from an IHttpResponse into the fault of a MessageExchange. This
69: * is called if the httpResponse's status code indicates an error occurred.
70: * (value >= 400)
71: * @param httpResponse The IHttpResponse
72: * @param fault The JBI Fault to populate
73: * @param msgExchange The MessageExchange that contains the fault
74: * @param svcDescHandler The component's ServiceDescriptionHandler
75: * that can be used by NormalizedMessageHandler to form a JBI
76: * WSDL 1.1 wrapper message.
77: * @throws MessagingException
78: */
79: public void HttpResponseToFault(IHttpResponse httpResponse,
80: Fault fault, MessageExchange msgExchange,
81: ServiceDescriptionHandler svcDescHandler)
82: throws MessagingException;
83:
84: }
|