org.exolab.jms.net.socket
Class SocketManagedConnection
java.lang.Object
|
+--org.exolab.jms.net.connector.AbstractManagedConnection
|
+--org.exolab.jms.net.multiplexer.MultiplexedManagedConnection
|
+--org.exolab.jms.net.socket.SocketManagedConnection
- All Implemented Interfaces:
- ManagedConnection, MultiplexerListener
- public abstract class SocketManagedConnection
- extends MultiplexedManagedConnection
SocketManagedConnection
manages multiple Connection
instances over a single socket.
- Version:
- $Revision: 1.5 $ $Date: 2006/12/16 12:37:17 $
- Author:
- Tim Anderson
Field Summary |
protected static org.apache.commons.logging.Log |
_log
The logger. |
Methods inherited from class org.exolab.jms.net.multiplexer.MultiplexedManagedConnection |
closed, createMultiplexer, createMultiplexer, destroy, error, getCaller, getConnection, getDisplayName, getPrincipal, getThreadGroup, hasPrincipal, invoke, isClient, ping, pinged, request, setInvocationHandler |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_log
protected static final org.apache.commons.logging.Log _log
- The logger.
SocketManagedConnection
public SocketManagedConnection(java.security.Principal principal,
SocketRequestInfo info)
throws ResourceException
- Construct a new client
SocketManagedConnection
.
- Parameters:
principal
- the security principalinfo
- the connection request info- Throws:
ResourceException
- if a socket cannot be created
SocketManagedConnection
public SocketManagedConnection(URI uri,
java.net.Socket socket,
Authenticator authenticator)
throws ResourceException
- Construct a new server
SocketManagedConnection
.
- Parameters:
uri
- the URI the acceptor was listening onsocket
- the socketauthenticator
- the connection authenticator- Throws:
ResourceException
- if an error occurs accessing the socket
getRemoteURI
public URI getRemoteURI()
- Returns the remote address to which this is connected.
- Returns:
- the remote address to which this is connected
getLocalURI
public URI getLocalURI()
- Returns the local address that this connection is bound to.
- Returns:
- the local address that this connection is bound to
getAlternativeURI
public URI getAlternativeURI()
- The alternative URI that the remote address is known as.
- Returns:
- alternative URI that the remote address is known as.
May be
null
.
createSocket
protected java.net.Socket createSocket(SocketRequestInfo info)
throws ResourceException
- Creates a new socket.
- Parameters:
info
- the connection request info- Returns:
- a new socket
- Throws:
ResourceException
- if a socket can't be created
createSocket
protected java.net.Socket createSocket(java.lang.String host,
int port)
throws java.io.IOException
- Creates a new socket.
- Parameters:
host
- the host to connect toport
- the port to connect to- Returns:
- a new socket
- Throws:
java.io.IOException
- for any I/O errorjava.lang.SecurityException
- if permission is denied
createEndpoint
protected Endpoint createEndpoint()
throws java.io.IOException
- Returns the endpoint to multiplex data over.
- Overrides:
createEndpoint
in class MultiplexedManagedConnection
- Returns:
- the endpoint to multiplex data over
- Throws:
java.io.IOException
- for any I/O error
init
protected void init(URI uri,
java.net.Socket socket)
throws ResourceException
- Initialises this connection.
- Parameters:
uri
- the URI representing this connectionsocket
- the socket- Throws:
ResourceException
- for any error
Copyright © 1999-2007 The OpenJMS Group. All Rights Reserved.