KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > osgi > service > event > EventAdmin


1 /*
2  * $Header: /cvshome/build/org.osgi.service.event/src/org/osgi/service/event/EventAdmin.java,v 1.6 2006/06/16 16:31:48 hargrave Exp $
3  *
4  * Copyright (c) OSGi Alliance (2005, 2006). All Rights Reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19 package org.osgi.service.event;
20
21 /**
22  * The Event Admin service. Bundles wishing to publish events must obtain the
23  * Event Admin service and call one of the event delivery methods.
24  *
25  * @version $Revision: 1.6 $
26  */

27 public interface EventAdmin {
28     /**
29      * Initiate asynchronous delivery of an event. This method returns to
30      * the caller before delivery of the event is completed.
31      *
32      * @param event The event to send to all listeners which subscribe
33      * to the topic of the event.
34      *
35      * @throws SecurityException If the caller does not have
36      * <code>TopicPermission[topic,PUBLISH]</code> for the topic
37      * specified in the event.
38      */

39     void postEvent(Event event);
40
41     /**
42      * Initiate synchronous delivery of an event. This method does not
43      * return to the caller until delivery of the event is completed.
44      *
45      * @param event The event to send to all listeners which subscribe
46      * to the topic of the event.
47      *
48      * @throws SecurityException If the caller does not have
49      * <code>TopicPermission[topic,PUBLISH]</code> for the topic
50      * specified in the event.
51      */

52     void sendEvent(Event event);
53 }
54
Popular Tags