org.jboss.remoting.transport
Interface ConnectorMBean

All Known Implementing Classes:
Connector, MarshallLoaderConnector

public interface ConnectorMBean

MBean interface.


Method Summary
 void addConnectionListener(ConnectionListener listener)
          Adds a connection listener to receive notification when a client connection is lost or disconnected.
 ServerInvocationHandler addInvocationHandler(java.lang.String subsystem, javax.management.ObjectName handlerObjectName)
          Adds a handler to the connector via OjbectName.
 ServerInvocationHandler addInvocationHandler(java.lang.String subsystem, ServerInvocationHandler handler)
          Adds an invocation handler for the named subsystem to the invoker we manage, and sets the mbean server on the invocation handler.
 void create()
          Creates the connector.
 void destroy()
          Destroys the connector.
 org.w3c.dom.Element getConfiguration()
          Configuration is an xml element indicating subsystems to be registered with the ServerInvoker we wrap.
 java.lang.String getInvokerLocator()
          Returns the invoker locator.
 long getLeasePeriod()
          Gets the lease period for client connections.
 InvokerLocator getLocator()
          Returns the locator to the connector.
 void removeConnectionListener(ConnectionListener listener)
          Removes connection listener from receiving client connection lost/disconnected notifications.
 void removeInvocationHandler(java.lang.String subsystem)
          Removes an invocation handler for the supplied subsystem from the invoker we manage, and unsets the MBeanServer on the handler.
 void setConfiguration(org.w3c.dom.Element xml)
          Configuration is an xml element indicating subsystems to be registered with the ServerInvoker we wrap.
 void setInvokerLocator(java.lang.String locator)
          Sets the invoker locator.
 void setLeasePeriod(long leasePeriodValue)
          Sets the lease period for client connections.
 void start()
          Starts the connector.
 void start(boolean runAsNewThread)
          Starts the connector.
 void stop()
          Stops the connector.
 

Method Detail

start

void start()
           throws java.lang.Exception
Starts the connector.

Throws:
java.lang.Exception

start

void start(boolean runAsNewThread)
           throws java.lang.Exception
Starts the connector.

Parameters:
runAsNewThread - indicates if should be started on new thread or the current one
Throws:
java.lang.Exception

stop

void stop()
Stops the connector.


create

void create()
            throws java.lang.Exception
Creates the connector.

Throws:
java.lang.Exception

destroy

void destroy()
Destroys the connector.


getLocator

InvokerLocator getLocator()
Returns the locator to the connector. Locator is the actual InvokerLocator object used to identify and get the ServerInvoker we are wrapping.


setInvokerLocator

void setInvokerLocator(java.lang.String locator)
                       throws java.lang.Exception
Sets the invoker locator. InvokerLocator is the string URI representation of the InvokerLocator used to get and identify the ServerInvoker we are wrapping.

Throws:
java.lang.Exception

getInvokerLocator

java.lang.String getInvokerLocator()
                                   throws java.lang.Exception
Returns the invoker locator. InvokerLocator is the string URI representation of the InvokerLocator used to get and identify the ServerInvoker we are wrapping.

Throws:
java.lang.Exception

setConfiguration

void setConfiguration(org.w3c.dom.Element xml)
                      throws java.lang.Exception
Configuration is an xml element indicating subsystems to be registered with the ServerInvoker we wrap. Using mbean subsystems that call registerSubsystem is more flexible.

Throws:
java.lang.Exception

getConfiguration

org.w3c.dom.Element getConfiguration()
Configuration is an xml element indicating subsystems to be registered with the ServerInvoker we wrap. Using mbean subsystems that call registerSubsystem is more flexible.


addInvocationHandler

ServerInvocationHandler addInvocationHandler(java.lang.String subsystem,
                                             javax.management.ObjectName handlerObjectName)
                                             throws java.lang.Exception
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).

Parameters:
subsystem -
handlerObjectName -
Returns:
The previous ServerInvocationHandler with the same subsystem value (case insensitive), if one existed. Otherwise will return null.
Throws:
java.lang.Exception

addInvocationHandler

ServerInvocationHandler addInvocationHandler(java.lang.String subsystem,
                                             ServerInvocationHandler handler)
                                             throws java.lang.Exception
Adds an invocation handler for the named subsystem to the invoker we manage, and sets the mbean server on the invocation handler. Will return previous ServerInvocationHandler with same subsystem value (case insensitive), if one existed. Otherwise will return null.

Throws:
java.lang.Exception

removeInvocationHandler

void removeInvocationHandler(java.lang.String subsystem)
                             throws java.lang.Exception
Removes an invocation handler for the supplied subsystem from the invoker we manage, and unsets the MBeanServer on the handler.

Throws:
java.lang.Exception

addConnectionListener

void addConnectionListener(ConnectionListener listener)
Adds a connection listener to receive notification when a client connection is lost or disconnected. Will only be triggered for notifications when leasing is turned on (via the lease period attribute being set to > 0).

Parameters:
listener -

removeConnectionListener

void removeConnectionListener(ConnectionListener listener)
Removes connection listener from receiving client connection lost/disconnected notifications.

Parameters:
listener -

setLeasePeriod

void setLeasePeriod(long leasePeriodValue)
Sets the lease period for client connections. Value is in milliseconds.

Parameters:
leasePeriodValue -

getLeasePeriod

long getLeasePeriod()
Gets the lease period for client connections. Value in milliseconds.

Returns:


Copyright © 1998-2005 JBoss Inc . All Rights Reserved.