|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.remoting.transport.Connector
public class Connector
Connector is an implementation of the ConnectorMBean interface.
The Connector is root component for the remoting server. It binds the server transport, marshaller, and handler together to form the remoting server instance. A transport connector is configured via *-service.xml such as:
1
303
304
60000
${jboss.bind.address}
6666
false
200
org.jboss.remoting.transport.mock.MockServerInvocationHandler
2410
| Field Summary | |
|---|---|
protected ServerInvoker |
invoker
|
protected org.jboss.logging.Logger |
log
|
| Constructor Summary | |
|---|---|
|
Connector()
Empty constructor. |
protected |
Connector(boolean isMarshallerConnector)
|
|
Connector(InvokerLocator locator)
Creates Connector with specified locator. |
|
Connector(InvokerLocator locator,
java.util.Map configuration)
Constructs connector for given locator and configuration. |
|
Connector(java.util.Map configuration)
Constructs connector and populates configuration information. |
|
Connector(java.lang.String locatorURI)
Creates Connector with specified locator. |
|
Connector(java.lang.String locatorURI,
java.util.Map configuration)
Constructs connector for given locator and configuration. |
| 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. |
ServerInvocationHandler[] |
getInvocationHandlers()
Will get array of all the handlers registered with the connector's server invoker. |
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. |
ServerInvoker |
getServerInvoker()
|
javax.net.ServerSocketFactory |
getServerSocketFactory()
|
javax.net.SocketFactory |
getSocketFactory()
|
boolean |
isStarted()
Indicates if the connector has been started yet. |
void |
postDeregister()
This method is called by the MBeanServer after deregistration takes place. |
void |
postRegister(java.lang.Boolean registrationDone)
This method is called by the MBeanServer after registration takes place or when registration fails. |
void |
preDeregister()
This method is called by the MBeanServer before deregistration takes place. |
javax.management.ObjectName |
preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
This method is called by the MBeanServer before registration takes place. |
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 |
setServerSocketFactory(javax.net.ServerSocketFactory serverSocketFactory)
The server socket factory can only be set on the Connector before the create() method has been called. |
void |
setSocketFactory(javax.net.SocketFactory socketFactory)
The socket factory (for callbacks) can only be set on the Connector before the create() method has been called. |
void |
start()
Starts the connector. |
void |
start(boolean runAsNewThread)
Starts the connector. |
void |
stop()
Stops the connector. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ServerInvoker invoker
protected final org.jboss.logging.Logger log
| Constructor Detail |
|---|
public Connector()
public Connector(java.lang.String locatorURI)
locatorURI - public Connector(InvokerLocator locator)
locator - public Connector(java.util.Map configuration)
configuration -
public Connector(java.lang.String locatorURI,
java.util.Map configuration)
locatorURI - configuration -
public Connector(InvokerLocator locator,
java.util.Map configuration)
locator - configuration - protected Connector(boolean isMarshallerConnector)
| Method Detail |
|---|
public boolean isStarted()
public javax.management.ObjectName preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
throws java.lang.Exception
The MBean can stop the registration by throwing an exception.The exception is forwarded to the invoker wrapped in an MBeanRegistrationException.
preRegister in interface javax.management.MBeanRegistrationserver - the MBeanServer the MBean is about to be
registered with.name - the suggested ObjectName supplied by the
MBeanServer.
java.lang.Exception - for any error, the MBean is not registered.public void postRegister(java.lang.Boolean registrationDone)
postRegister in interface javax.management.MBeanRegistrationregistrationDone - the MBeanServer passes true when the
MBean was registered, false otherwise.
public void preDeregister()
throws java.lang.Exception
The MBean can throw an exception, this will stop the deregistration. The exception is forwarded to the invoker wrapped in an MBeanRegistrationException.
preDeregister in interface javax.management.MBeanRegistrationjava.lang.Exceptionpublic void postDeregister()
postDeregister in interface javax.management.MBeanRegistration
public void start()
throws java.lang.Exception
start in interface ConnectorMBeanjava.lang.Exception
public void start(boolean runAsNewThread)
throws java.lang.Exception
start in interface ConnectorMBeanrunAsNewThread - indicates if should be started on new thread or the current one. If
runAsNewThread is true, new thread will not be daemon thread.
java.lang.Exceptionpublic void addConnectionListener(ConnectionListener listener)
addConnectionListener in interface ConnectorMBeanlistener - public void removeConnectionListener(ConnectionListener listener)
removeConnectionListener in interface ConnectorMBeanlistener - public void setLeasePeriod(long leasePeriodValue)
setLeasePeriod in interface ConnectorMBeanleasePeriodValue - public long getLeasePeriod()
getLeasePeriod in interface ConnectorMBeanpublic void stop()
stop in interface ConnectorMBean
public void create()
throws java.lang.Exception
create in interface ConnectorMBeanjava.lang.Exceptionpublic void destroy()
destroy in interface ConnectorMBeanpublic ServerInvoker getServerInvoker()
public ServerInvocationHandler[] getInvocationHandlers()
public InvokerLocator getLocator()
getLocator in interface ConnectorMBean
public void setInvokerLocator(java.lang.String locator)
throws java.lang.Exception
setInvokerLocator in interface ConnectorMBeanjava.lang.Exception
public java.lang.String getInvokerLocator()
throws java.lang.Exception
getInvokerLocator in interface ConnectorMBeanjava.lang.Exception
public void setConfiguration(org.w3c.dom.Element xml)
throws java.lang.Exception
setConfiguration in interface ConnectorMBeanjava.lang.Exceptionpublic org.w3c.dom.Element getConfiguration()
getConfiguration in interface ConnectorMBean
public ServerInvocationHandler addInvocationHandler(java.lang.String subsystem,
javax.management.ObjectName handlerObjectName)
throws java.lang.Exception
addInvocationHandler in interface ConnectorMBeansubsystem - handlerObjectName -
java.lang.Exception
public ServerInvocationHandler addInvocationHandler(java.lang.String subsystem,
ServerInvocationHandler handler)
throws java.lang.Exception
addInvocationHandler in interface ConnectorMBeanjava.lang.Exception
public void removeInvocationHandler(java.lang.String subsystem)
throws java.lang.Exception
removeInvocationHandler in interface ConnectorMBeanjava.lang.Exceptionpublic void setServerSocketFactory(javax.net.ServerSocketFactory serverSocketFactory)
serverSocketFactory - public javax.net.ServerSocketFactory getServerSocketFactory()
public void setSocketFactory(javax.net.SocketFactory socketFactory)
socketFactory - public javax.net.SocketFactory getSocketFactory()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||