KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > admin > event > EventDispatcher


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package com.sun.enterprise.admin.event;
24
25 /**
26  * Dispatches an event to a target. Each server instance has an event
27  * multicaster. This allows each server instance including the domain
28  * admin server to send events bi-directionally. This works as a fat
29  * pipe or a bus between the server instances.
30  *
31  * <p> Event dispatcher only knows how to propagate an event between
32  * remote VMs. In other words, it is not responsible for making the
33  * actual delivery of the event with in the sever instance.
34  *
35  * @author Nazrul Islam
36  * @since JDK1.4
37  */

38 public interface EventDispatcher {
39
40     /**
41      * Dispatches an event from one event multicaster to another based
42      * on the destination type in the event. If the destination is a cluster
43      * or a group, it will send event to all running server instances in the
44      * group.
45      *
46      * @param event notification event
47      * @return response from the listener
48      */

49     public AdminEventResult dispatch(AdminEvent event);
50 }
51
Popular Tags