~ubuntu-branches/ubuntu/wily/libjboss-remoting-java/wily

« back to all changes in this revision

Viewing changes to src/org/jboss/remoting/transport/ConnectorMBean.java

  • Committer: Package Import Robot
  • Author(s): Torsten Werner
  • Date: 2011-09-09 14:01:03 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: package-import@ubuntu.com-20110909140103-hqokx61534tas9rg
Tags: 2.5.3.SP1-1
* Newer but not newest upstream release. Do not build samples.
* Change debian/watch to upstream's svn repo.
* Add patch to fix compile error caused by tomcat update.
  (Closes: #628303)
* Switch to source format 3.0.
* Switch to debhelper level 7.
* Remove useless Depends.
* Update Standards-Version: 3.9.2.
* Update README.source.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
* JBoss, Home of Professional Open Source
3
 
* Copyright 2005, JBoss Inc., and individual contributors as indicated
4
 
* by the @authors tag. See the copyright.txt in the distribution for a
5
 
* full listing of individual contributors.
6
 
*
7
 
* This is free software; you can redistribute it and/or modify it
8
 
* under the terms of the GNU Lesser General Public License as
9
 
* published by the Free Software Foundation; either version 2.1 of
10
 
* the License, or (at your option) any later version.
11
 
*
12
 
* This software is distributed in the hope that it will be useful,
13
 
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
 
* Lesser General Public License for more details.
16
 
*
17
 
* You should have received a copy of the GNU Lesser General Public
18
 
* License along with this software; if not, write to the Free
19
 
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20
 
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21
 
*/
22
 
 
23
 
package org.jboss.remoting.transport;
24
 
 
25
 
import org.jboss.remoting.ConnectionListener;
26
 
 
27
 
/**
28
 
 * MBean interface.
29
 
 */
30
 
public interface ConnectorMBean
31
 
{
32
 
 
33
 
   /**
34
 
    * Starts the connector.
35
 
    */
36
 
   void start() throws java.lang.Exception;
37
 
 
38
 
   /**
39
 
    * Starts the connector.
40
 
    *
41
 
    * @param runAsNewThread indicates if should be started on new thread or the current one
42
 
    * @throws java.lang.Exception
43
 
    */
44
 
   void start(boolean runAsNewThread) throws java.lang.Exception;
45
 
 
46
 
   /**
47
 
    * Stops the connector.
48
 
    */
49
 
   void stop();
50
 
 
51
 
   /**
52
 
    * Creates the connector.
53
 
    */
54
 
   void create() throws java.lang.Exception;
55
 
 
56
 
   /**
57
 
    * Destroys the connector.
58
 
    */
59
 
   void destroy();
60
 
 
61
 
   /**
62
 
    * Returns the locator to the connector. Locator is the actual InvokerLocator object used to identify and get the ServerInvoker we are wrapping.
63
 
    */
64
 
   org.jboss.remoting.InvokerLocator getLocator();
65
 
 
66
 
   /**
67
 
    * Sets the invoker locator. InvokerLocator is the string URI representation of the InvokerLocator used to get and identify the ServerInvoker we are wrapping.
68
 
    */
69
 
   void setInvokerLocator(java.lang.String locator) throws java.lang.Exception;
70
 
 
71
 
   /**
72
 
    * Returns the invoker locator. InvokerLocator is the string URI representation of the InvokerLocator used to get and identify the ServerInvoker we are wrapping.
73
 
    */
74
 
   java.lang.String getInvokerLocator() throws java.lang.Exception;
75
 
 
76
 
   /**
77
 
    * Configuration is an xml element indicating subsystems to be registered with the ServerInvoker we wrap. Using mbean subsystems that call registerSubsystem is more flexible.
78
 
    */
79
 
   void setConfiguration(org.w3c.dom.Element xml) throws java.lang.Exception;
80
 
 
81
 
   /**
82
 
    * Configuration is an xml element indicating subsystems to be registered with the ServerInvoker we wrap. Using mbean subsystems that call registerSubsystem is more flexible.
83
 
    */
84
 
   org.w3c.dom.Element getConfiguration();
85
 
 
86
 
   /**
87
 
    * 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).
88
 
    *
89
 
    * @param subsystem
90
 
    * @param handlerObjectName
91
 
    * @return The previous ServerInvocationHandler with the same subsystem value (case insensitive), if one existed.  Otherwise will return null.
92
 
    * @throws Exception
93
 
    */
94
 
   org.jboss.remoting.ServerInvocationHandler addInvocationHandler(java.lang.String subsystem, javax.management.ObjectName handlerObjectName) throws java.lang.Exception;
95
 
 
96
 
   /**
97
 
    * Adds an invocation handler for the named subsystem to the invoker we manage, and sets the mbean server on the invocation handler.
98
 
    * Will return previous ServerInvocationHandler with same subsystem value (case insensitive), if one existed.  Otherwise will return null.
99
 
    */
100
 
   org.jboss.remoting.ServerInvocationHandler addInvocationHandler(java.lang.String subsystem, org.jboss.remoting.ServerInvocationHandler handler) throws java.lang.Exception;
101
 
 
102
 
   /**
103
 
    * Removes an invocation handler for the supplied subsystem from the invoker we manage, and unsets the MBeanServer on the handler.
104
 
    */
105
 
   void removeInvocationHandler(java.lang.String subsystem) throws java.lang.Exception;
106
 
 
107
 
   /**
108
 
    * Adds a connection listener to receive notification when a client connection
109
 
    * is lost or disconnected.  Will only be triggered for notifications when
110
 
    * leasing is turned on (via the lease period attribute being set to > 0).
111
 
    * @param listener
112
 
    *
113
 
    * @jmx.managed-operation description = "Add a connection listener to call when detect that a client has
114
 
    * failed or disconnected."
115
 
    * impact      = "ACTION"
116
 
    * @jmx.managed-parameter name        = "listener"
117
 
    * type        = "org.jboss.remoting.ConnectionListener"
118
 
    * description = "The connection listener to register"
119
 
    */
120
 
   void addConnectionListener(ConnectionListener listener);
121
 
 
122
 
   /**
123
 
    * Removes connection listener from receiving client connection lost/disconnected
124
 
    * notifications.
125
 
    * @param listener
126
 
    *
127
 
    * @jmx.managed-operation description = "Remove a client connection listener."
128
 
    * impact      = "ACTION"
129
 
    * @jmx.managed-parameter name        = "listener"
130
 
    * type        = "org.jboss.remoting.ConnectionListener"
131
 
    * description = "The client connection listener to remove."
132
 
    */
133
 
   void removeConnectionListener(ConnectionListener listener);
134
 
 
135
 
   /**
136
 
    * Sets the lease period for client connections.
137
 
    * Value is in milliseconds.
138
 
    * @param leasePeriodValue
139
 
    *
140
 
    * @jmx.managed-attribute description = "The number of milliseconds that should be used
141
 
    * when establishing the client lease period (meaning client will need to update its lease
142
 
    * within this amount of time or will be considered dead)."
143
 
    * access     = "read-write"
144
 
    */
145
 
   void setLeasePeriod(long leasePeriodValue);
146
 
 
147
 
   /**
148
 
    * Gets the lease period for client connections.
149
 
    * Value in milliseconds.
150
 
    * @return
151
 
    *
152
 
    * @jmx.managed-attribute
153
 
    */
154
 
   long getLeasePeriod();
155
 
}