KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > petals > component > common > basic > binding > JBIListener


1 /**
2  * PETALS - PETALS Services Platform.
3  * Copyright (c) 2006 EBM Websourcing, http://www.ebmwebsourcing.com/
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * -------------------------------------------------------------------------
19  * $Id: JBIListener.java 154 27 sept. 06 ofabre $
20  * -------------------------------------------------------------------------
21  */

22 package org.objectweb.petals.component.common.basic.binding;
23
24 import java.net.URI JavaDoc;
25
26 import javax.jbi.messaging.MessagingException;
27 import javax.jbi.messaging.NormalizedMessage;
28 import javax.xml.namespace.QName JavaDoc;
29
30 import org.objectweb.petals.component.common.MEPConstants;
31
32 /**
33  * This interface defines a method that forward internal JBI messages to
34  * external services.
35  *
36  * @author alouis, ofabre - EBM Websourcing
37  *
38  */

39 public interface JBIListener {
40
41     /**
42      * Send an incoming JBI message to an outside service. The address
43      * associated with the requested endpoint is resolved by the abstract
44      * component.
45      *
46      * @param address
47      * the external service address associated to the endpoint
48      * given in the incoming message exchange
49      * @param in
50      * the "in" message from the MessageExchange sent by the JBI
51      * consumer component
52      * @param out
53      * the "out" message from the MessageExchange. This message have
54      * to be set in case of IN_OUT_PATTERN. It can be set in case of
55      * IN_OPTIONAL_OUT_PATTERN. null in case of IN_ONLY_PATTERN or
56      * ROBUST_IN_ONLY_PATTERN
57      * @param operation
58      * the operation set for the MessageExchange.
59      * @param messageExchangePattern
60      * The exchange pattern of the MessageExchange : IN_OUT_PATTERN,
61      * IN_OPTIONAL_OUT_PATTERN, IN_ONLY_PATTERN,
62      * ROBUST_IN_ONLY_PATTERN.
63      * @see MEPConstants
64      *
65      * @return boolean used in case of IN_OPTIONAL_OUT_PATTERN. Set to true if
66      * there's an out message to send, false otherwise
67      * @throws MessagingException
68      * If an error occurs during processing. If the MEP allows it,
69      * a Fault is returned on the MessageExchange
70      */

71     public boolean onJBIMessage(String JavaDoc address, NormalizedMessage in,
72             NormalizedMessage out, QName JavaDoc operation, URI JavaDoc messageExchangePattern)
73         throws MessagingException;
74
75 }
76
Popular Tags