siena.comm
Class SSLPacketReceiver
java.lang.Object
siena.comm.KAPacketReceiver
siena.comm.SSLPacketReceiver
- All Implemented Interfaces:
- PacketReceiver
public class SSLPacketReceiver
- extends KAPacketReceiver
receives packets through an SSL connection.
Communicates through SSL connections. This receiver uses the SSL
layer provided by the Java Secure Socket
Extension (JSSE) v.1.0.2.
This class uses the default settings of your JSSE installation.
Specific configurations are possible by setting the socket
factory
. You should refer to the JSSE documentation to install
and configure your JSSE layer.
Field Summary |
static java.lang.String |
Schema
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Schema
public static final java.lang.String Schema
- See Also:
- Constant Field Values
SSLPacketReceiver
public SSLPacketReceiver(javax.net.ssl.SSLServerSocket s)
throws java.io.IOException
- Throws:
java.io.IOException
SSLPacketReceiver
public SSLPacketReceiver(int pnumber)
throws java.io.IOException
- Throws:
java.io.IOException
SSLPacketReceiver
public SSLPacketReceiver(int pnumber,
int qsize)
throws java.io.IOException
- Throws:
java.io.IOException
address
public byte[] address()
- external address of this packet receiver.
Uses the following schema syntax:
ssl:
host:
port
- Specified by:
address
in interface PacketReceiver
- See Also:
PacketReceiver.address()
setHostName
public void setHostName(java.lang.String hostname)
- Description copied from class:
KAPacketReceiver
- explicitly sets the address of this packet receiver.
This method allows users to set the host name or IP address
that this receiver advertises as its externally-visible
address. This might be necessary in the cases in which the
Java VM can not reliably figure out such an address by itself.
- Overrides:
setHostName
in class KAPacketReceiver
getEnabledCipherSuites
public java.lang.String[] getEnabledCipherSuites()
getEnableSessionCreation
public boolean getEnableSessionCreation()
getNeedClientAuth
public boolean getNeedClientAuth()
getSupportedCipherSuites
public java.lang.String[] getSupportedCipherSuites()
getUseClientMode
public boolean getUseClientMode()
setEnabledCipherSuites
public void setEnabledCipherSuites(java.lang.String[] suites)
setEnableSessionCreation
public void setEnableSessionCreation(boolean flag)
setNeedClientAuth
public void setNeedClientAuth(boolean flag)
setUseClientMode
public void setUseClientMode(boolean flag)
setServerSocketFactory
public static void setServerSocketFactory(javax.net.ssl.SSLServerSocketFactory s)
- allows user-defined SSL socket fatories.
This method can be used to customize the SSL layer. Please,
refer to the JSSE documentation for more information on SSL
configuration methods.
uri
public byte[] uri()
- Deprecated. since 1.4.0. Please use
address()
instead.
- This method has been replaced by
address()
. The
reason for this change is more conceptual than practical: the
term "address" is more appropriate than the term "uri" because
it provides a way to reach a PacketReceiver
,
rather than an identifier.
guessMyIPAddress
protected static java.net.InetAddress guessMyIPAddress()
throws java.net.UnknownHostException
- Throws:
java.net.UnknownHostException
guessMyIPAddress
protected static java.net.InetAddress guessMyIPAddress(java.net.ServerSocket s)
throws java.net.UnknownHostException
- Throws:
java.net.UnknownHostException
guessMyIPAddress
protected static java.net.InetAddress guessMyIPAddress(java.net.DatagramSocket s)
throws java.net.UnknownHostException
- Throws:
java.net.UnknownHostException
Copyright © 2000-2005 University of Colorado.
Copyright © 2005-2008 Antonio Carzaniga.
This documentation is maintained by Antonio Carzaniga