Siena (v.1.5.5) API documentation

siena.comm
Class SSLPacketReceiver

java.lang.Object
  extended by siena.comm.KAPacketReceiver
      extended by 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
           
 
Fields inherited from class siena.comm.KAPacketReceiver
AcceptPollingInterval, DefaultMaxActiveConnections, DefaultPort, DefaultReceiveTimeout, receive_timeout
 
Constructor Summary
SSLPacketReceiver(int pnumber)
           
SSLPacketReceiver(int pnumber, int qsize)
           
SSLPacketReceiver(javax.net.ssl.SSLServerSocket s)
           
 
Method Summary
 byte[] address()
          external address of this packet receiver.
 java.lang.String[] getEnabledCipherSuites()
           
 boolean getEnableSessionCreation()
           
 boolean getNeedClientAuth()
           
 java.lang.String[] getSupportedCipherSuites()
           
 boolean getUseClientMode()
           
protected static java.net.InetAddress guessMyIPAddress()
           
protected static java.net.InetAddress guessMyIPAddress(java.net.DatagramSocket s)
           
protected static java.net.InetAddress guessMyIPAddress(java.net.ServerSocket s)
           
 void setEnabledCipherSuites(java.lang.String[] suites)
           
 void setEnableSessionCreation(boolean flag)
           
 void setHostName(java.lang.String hostname)
          explicitly sets the address of this packet receiver.
 void setNeedClientAuth(boolean flag)
           
static void setServerSocketFactory(javax.net.ssl.SSLServerSocketFactory s)
          allows user-defined SSL socket fatories.
 void setUseClientMode(boolean flag)
           
 byte[] uri()
          Deprecated. since 1.4.0. Please use address() instead.
 
Methods inherited from class siena.comm.KAPacketReceiver
receive, receive, receive, setMaxActiveConnections, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface siena.comm.PacketReceiver
uri
 

Field Detail

Schema

public static final java.lang.String Schema
See Also:
Constant Field Values
Constructor Detail

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
Method Detail

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

Siena (v.1.5.5) API documentation

Copyright © 2000-2005 University of Colorado.
Copyright © 2005-2008 Antonio Carzaniga.
This documentation is maintained by Antonio Carzaniga