|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.exolab.jms.net.connector.AbstractManagedConnection
|
+--org.exolab.jms.net.multiplexer.MultiplexedManagedConnection
A ManagedConnection that uses a Multiplexer to multiplex
data over an Endpoint
| Constructor Summary | |
MultiplexedManagedConnection(Authenticator authenticator)
Construct a new server MultiplexedManagedConnection. |
|
MultiplexedManagedConnection(java.security.Principal principal)
Construct a new client MultiplexedManagedConnection. |
|
| Method Summary | |
void |
closed()
Invoked when the connection is closed by the peer. |
protected abstract Endpoint |
createEndpoint()
Creates the endpoint to multiplex data over. |
protected Multiplexer |
createMultiplexer(Endpoint endpoint,
Authenticator authenticator)
Create a new server-side multiplexer. |
protected Multiplexer |
createMultiplexer(Endpoint endpoint,
java.security.Principal principal)
Create a new client-side multiplexer. |
void |
destroy()
Destroys the physical connection. |
void |
error(java.lang.Throwable error)
Invoked when an error occurs on the multiplexer. |
protected Caller |
getCaller()
Helper to return an Caller instance, denoting the client
performing a method invocation. |
Connection |
getConnection()
Creates a new connection handle for the underlying physical connection. |
protected java.lang.String |
getDisplayName()
Helper to generate a descriptive name, for display purposes. |
java.security.Principal |
getPrincipal()
Returns the principal associated with this connection. |
protected java.lang.ThreadGroup |
getThreadGroup()
Returns the thread group to associate with allocated threads. |
boolean |
hasPrincipal(java.security.Principal principal)
Determines if the security principal that owns this connection is the same as that supplied. |
protected Response |
invoke(Connection connection,
Request request)
Invoke a method on a remote object. |
protected boolean |
isClient()
Helper to determine if this is a client-side or server side instance. |
void |
ping()
Ping the connection. |
void |
pinged(int token)
Notifies of a successful ping. |
void |
request(org.exolab.jms.net.multiplexer.Channel channel)
Invoked for an invocation request. |
void |
setInvocationHandler(InvocationHandler handler)
Registers a handler for handling invocations on objects exported via this connection. |
| Methods inherited from class org.exolab.jms.net.connector.AbstractManagedConnection |
getConnectionEventListener, notifyClosed, notifyError, setConnectionEventListener |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.exolab.jms.net.connector.ManagedConnection |
getLocalURI, getRemoteURI |
| Constructor Detail |
public MultiplexedManagedConnection(java.security.Principal principal)
MultiplexedManagedConnection.principal - the security principal. May be nullpublic MultiplexedManagedConnection(Authenticator authenticator)
MultiplexedManagedConnection.authenticator - the connection authenticator| Method Detail |
public void setInvocationHandler(InvocationHandler handler)
throws ResourceException
handler - the invocation handlerIllegalStateException - if a handler is already registeredResourceException - for any error
public Connection getConnection()
throws IllegalStateException
IllegalStateException - if an invocation handler hasn't been
registered
public void ping()
throws ResourceException
IllegalStateException - if a connection is not establishedResourceException - for any error
public void destroy()
throws ResourceException
ResourceException - for any errorpublic java.security.Principal getPrincipal()
null if none is setpublic boolean hasPrincipal(java.security.Principal principal)
setInvocationHandler(org.exolab.jms.net.connector.InvocationHandler)principal - the principal to compare. May be null.true if the principal that owns this connection is
the same as principalpublic void request(org.exolab.jms.net.multiplexer.Channel channel)
request in interface MultiplexerListenerchannel - the channel the invocation is onpublic void closed()
closed in interface MultiplexerListenerpublic void error(java.lang.Throwable error)
error in interface MultiplexerListenererror - the errorpublic void pinged(int token)
pinged in interface MultiplexerListenertoken - the token sent in the ping
protected Response invoke(Connection connection,
Request request)
connection - the connection invoking the requestrequest - the request
protected abstract Endpoint createEndpoint()
throws java.io.IOException
java.io.IOException - for any I/O error
protected Multiplexer createMultiplexer(Endpoint endpoint,
java.security.Principal principal)
throws java.io.IOException,
SecurityException
endpoint - the endpoint to multiplex messages overprincipal - the security principaljava.io.IOException - if an I/O error occursSecurityException - if connection is refused by the server
protected Multiplexer createMultiplexer(Endpoint endpoint,
Authenticator authenticator)
throws java.io.IOException,
ResourceException
endpoint - the endpoint to multiplex messages overauthenticator - the connection authetnicatorjava.io.IOException - if an I/O error occursResourceException - if the authenticator cannot authenticateprotected boolean isClient()
true if this is a client-side instance, otherwise
falseprotected Caller getCaller()
Caller instance, denoting the client
performing a method invocation. Only applicable for server-side, and only
after the multiplexer has been created.null if it hasn't been
initialisedprotected java.lang.ThreadGroup getThreadGroup()
null to use the default thread group.protected java.lang.String getDisplayName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||