KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > remoting > transport > ConnectorMBean


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.remoting.transport;
8
9 /**
10  * MBean interface.
11  */

12 public interface ConnectorMBean
13 {
14
15    /**
16     * Starts the connector.
17     */

18    void start() throws java.lang.Exception JavaDoc;
19
20    /**
21     * Starts the connector.
22     *
23     * @param runAsNewThread indicates if should be started on new thread or the current one
24     * @throws java.lang.Exception
25     */

26    void start(boolean runAsNewThread) throws java.lang.Exception JavaDoc;
27
28    /**
29     * Stops the connector.
30     */

31    void stop();
32
33    /**
34     * Creates the connector.
35     */

36    void create() throws java.lang.Exception JavaDoc;
37
38    /**
39     * Destroys the connector.
40     */

41    void destroy();
42
43    /**
44     * Returns the locator to the connector. Locator is the actual InvokerLocator object used to identify and get the ServerInvoker we are wrapping.
45     */

46    org.jboss.remoting.InvokerLocator getLocator();
47
48    /**
49     * Sets the invoker locator. InvokerLocator is the string URI representation of the InvokerLocator used to get and identify the ServerInvoker we are wrapping.
50     */

51    void setInvokerLocator(java.lang.String JavaDoc locator) throws java.lang.Exception JavaDoc;
52
53    /**
54     * Returns the invoker locator. InvokerLocator is the string URI representation of the InvokerLocator used to get and identify the ServerInvoker we are wrapping.
55     */

56    java.lang.String JavaDoc getInvokerLocator() throws java.lang.Exception JavaDoc;
57
58    /**
59     * Configuration is an xml element indicating subsystems to be registered with the ServerInvoker we wrap. Using mbean subsystems that call registerSubsystem is more flexible.
60     */

61    void setConfiguration(org.w3c.dom.Element JavaDoc xml) throws java.lang.Exception JavaDoc;
62
63    /**
64     * Configuration is an xml element indicating subsystems to be registered with the ServerInvoker we wrap. Using mbean subsystems that call registerSubsystem is more flexible.
65     */

66    org.w3c.dom.Element JavaDoc getConfiguration();
67
68    /**
69     * Adds a handler to the connector via OjbectName. This will create a mbean proxy of type of ServerInvocationHandler for the MBean specified by object name passed (so has to implement ServerInvocationHandler interface).
70     *
71     * @param subsystem
72     * @param handlerObjectName
73     * @return The previous ServerInvocationHandler with the same subsystem value (case insensitive), if one existed. Otherwise will return null.
74     * @throws Exception
75     */

76    org.jboss.remoting.ServerInvocationHandler addInvocationHandler(java.lang.String JavaDoc subsystem, javax.management.ObjectName JavaDoc handlerObjectName) throws java.lang.Exception JavaDoc;
77
78    /**
79     * Adds an invocation handler for the named subsystem to the invoker we manage, and sets the mbean server on the invocation handler.
80     * Will return previous ServerInvocationHandler with same subsystem value (case insensitive), if one existed. Otherwise will return null.
81     */

82    org.jboss.remoting.ServerInvocationHandler addInvocationHandler(java.lang.String JavaDoc subsystem, org.jboss.remoting.ServerInvocationHandler handler) throws java.lang.Exception JavaDoc;
83
84    /**
85     * Removes an invocation handler for the supplied subsystem from the invoker we manage, and unsets the MBeanServer on the handler.
86     */

87    void removeInvocationHandler(java.lang.String JavaDoc subsystem) throws java.lang.Exception JavaDoc;
88
89 }
90
Popular Tags