KickJava   Java API By Example, From Geeks To Geeks.

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


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
24 package com.sun.enterprise.admin.event;
25
26 public interface EjbTimerEventListener extends AdminEventListener {
27
28    /**
29     * Migrates all ejb timers that belongs to the "from" server instance
30     * to the targeted server instance.
31     *
32     * @param event timer event
33     * @param from name of the server instance from where
34     * ejb timers need to be migrated
35     * @returns number of timers that were migrated
36     * @throws AdminEventListenerException
37     * when the listener is unable to process the event
38     */

39    public int migrateTimer(EjbTimerEvent event, String JavaDoc from)
40        throws AdminEventListenerException;
41   
42    /**
43     * Returns all active timers associated with the given server ids.
44     *
45     * @param event timer event
46     * @param servers name of server instances
47     *
48     * @returns description of all active timers associated with the given
49     * server ids
50     *
51     * @throws AdminEventListenerException
52     * when the listener is unable to process the event
53     */

54    public String JavaDoc[] listTimers(EjbTimerEvent event, String JavaDoc[] servers)
55        throws AdminEventListenerException;
56
57 }
58
Popular Tags