KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > mx4j > tools > remote > http > HTTPConnection


1 /*
2  * Copyright (C) The MX4J Contributors.
3  * All rights reserved.
4  *
5  * This software is distributed under the terms of the MX4J License version 1.0.
6  * See the terms of the MX4J License in the documentation provided with this software.
7  */

8
9 package mx4j.tools.remote.http;
10
11 import java.io.IOException JavaDoc;
12 import javax.management.InstanceNotFoundException JavaDoc;
13 import javax.management.ListenerNotFoundException JavaDoc;
14 import javax.management.ObjectName JavaDoc;
15 import javax.management.remote.NotificationResult JavaDoc;
16 import javax.security.auth.Subject JavaDoc;
17
18 import mx4j.tools.remote.JMXConnection;
19
20 /**
21  * @version $Revision: 1.3 $
22  */

23 public interface HTTPConnection extends JMXConnection
24 {
25    /**
26     * This method is called when a call initiated by {@link javax.management.remote.JMXConnector#connect}
27     * arrives on server side. For HTTP connections, the socket is handled by the web container, but
28     * the remote procedure call that arrives along with the HTTP request is parsed and then (normally)
29     * forwarded to a JavaBean (that will implement this interface).
30     * Implementations of this method will normally call {@link mx4j.tools.remote.ConnectionManager#connect}.
31     *
32     * @param credentials The credential for authentication
33     * @return The connection id for the newly created connection
34     * @throws IOException If a communication problem occurs
35     * @throws SecurityException If the authentication fails
36     */

37    public String JavaDoc connect(Object JavaDoc credentials)
38            throws IOException JavaDoc,
39                   SecurityException JavaDoc;
40
41    public Integer JavaDoc addNotificationListener(ObjectName JavaDoc name, Object JavaDoc filter, Subject JavaDoc delegate)
42            throws InstanceNotFoundException JavaDoc,
43                   IOException JavaDoc;
44
45    public void removeNotificationListeners(ObjectName JavaDoc name, Integer JavaDoc[] listenerIDs, Subject JavaDoc delegate)
46            throws InstanceNotFoundException JavaDoc,
47                   ListenerNotFoundException JavaDoc,
48                   IOException JavaDoc;
49
50    public NotificationResult JavaDoc fetchNotifications(long clientSequenceNumber, int maxNotifications, long timeout)
51            throws IOException JavaDoc;
52 }
53
Popular Tags