org.openorb.ssliop
Class SSLTransport
java.lang.Object
|
+--org.openorb.iiop.IIOPTransport
|
+--org.openorb.ssliop.SSLTransport
- All Implemented Interfaces:
- org.apache.avalon.framework.logger.LogEnabled, org.openorb.net.Transport
- public class SSLTransport
- extends org.openorb.iiop.IIOPTransport
- implements org.apache.avalon.framework.logger.LogEnabled
Transport layer for SSL connections.
- Author:
- Chris Wood
|
Constructor Summary |
SSLTransport(java.net.InetAddress host,
int port,
int assocRequires,
java.lang.String[] enableCipherSuites,
javax.net.ssl.SSLSocketFactory socFactory)
Constructor |
|
Method Summary |
void |
close()
Close magic reader threads. |
void |
enableLogging(org.apache.avalon.framework.logger.Logger logger)
|
boolean |
establishAssociation(org.openorb.net.Address addr,
org.openorb.net.TransportAssociationHolder binding)
Check for applicability of channel for carrying messages for the
specified address and setup any client transport binding. |
org.openorb.io.StorageBuffer |
recvMessage(int timeout,
org.openorb.net.TransportAssociationHolder assoc)
Read next message. |
java.lang.String |
toString()
Print out socket information. |
| Methods inherited from class org.openorb.iiop.IIOPTransport |
isMessageError, isOpen, open, sendMessage, setMessageError |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SSLTransport
public SSLTransport(java.net.InetAddress host,
int port,
int assocRequires,
java.lang.String[] enableCipherSuites,
javax.net.ssl.SSLSocketFactory socFactory)
- Constructor
enableLogging
public void enableLogging(org.apache.avalon.framework.logger.Logger logger)
- Specified by:
enableLogging in interface org.apache.avalon.framework.logger.LogEnabled
recvMessage
public org.openorb.io.StorageBuffer recvMessage(int timeout,
org.openorb.net.TransportAssociationHolder assoc)
throws java.io.EOFException
- Read next message. This function will be regularly serviced by a worker
thread.
- Overrides:
recvMessage in class org.openorb.iiop.IIOPTransport
- Parameters:
timeout - max time to wait before recieving a message.assoc - (out) will be set to contain the transport association for the
message. This will be passed back to sendMessage when a reply is sent
for server requests. For client replies the contents will be
compared to the ClientBinding's association, if they don't match some
action will be taken.- Throws:
java.io.EOFException - end of file has been reached. This is an orderly
shutdown.org.omg.CORBA.COMM_FAILURE - Transport failure occoured. This is a
disorderly shutdown.
establishAssociation
public boolean establishAssociation(org.openorb.net.Address addr,
org.openorb.net.TransportAssociationHolder binding)
- Check for applicability of channel for carrying messages for the
specified address and setup any client transport binding.
- Overrides:
establishAssociation in class org.openorb.iiop.IIOPTransport
- Parameters:
addr - the address.assoc - (out) will be set to contain the transport association for
the client binding. This will be passed back to sendMessage when a
request is sent.- Returns:
- true if this transport can carry messages for the target. Basic
checks like checking the host and port will already be done, just check
specifics. If false a new channel will be opened for requests.
toString
public java.lang.String toString()
- Print out socket information.
- Overrides:
toString in class org.openorb.iiop.IIOPTransport
close
public void close()
- Close magic reader threads.
- Overrides:
close in class org.openorb.iiop.IIOPTransport