KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > petals > component > common > bc > ExternalListenerManager


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$
20  * -------------------------------------------------------------------------
21  */

22
23 package org.objectweb.petals.component.common.bc;
24
25 import org.objectweb.petals.component.common.PEtALSComponentSDKException;
26 import org.objectweb.petals.tools.jbicommon.descriptor.Extensions;
27
28 /**
29  * This manager is used to enable a binding component to handle external service
30  * call. It defines methods to register and unregister listeners for external
31  * services.
32  * <p>
33  * This interface have to be implemented if the related binding component is
34  * used to listen to incoming messages from external services, in order to
35  * forward these messages to internal JBI Components.
36  *
37  * @author ofabre, alouis - EBM Websourcing
38  *
39  */

40 public interface ExternalListenerManager {
41
42     /**
43      * Start a listener for the given address.
44      *
45      * @param address
46      * the external address to listen to. Not null
47      * @param extensions
48      * JBI descriptor extensions. The message exchange targets a
49      * specific endpoint, this endpoint has been activated during the
50      * processing of a provides node of a service unit jbi
51      * descriptor. Theses extensions are the extensions of this
52      * consumes node. Can be null
53      * @throws PEtALSComponentSDKException
54      * if an error occurs during listener starting
55      */

56     void startListening(String JavaDoc address, Extensions extensions) throws PEtALSComponentSDKException;
57
58     /**
59      * Stop a listener for the given address.
60      *
61      * @param address
62      * the external address to listen to. Not null
63      * @throws PEtALSComponentSDKException
64      * if an error occurs during listener starting
65      */

66     void stopListening(String JavaDoc address) throws PEtALSComponentSDKException;
67
68 }
69
Popular Tags