SSLPacketReceiver (Siena 2.0.4 API Documentation)
Date: 2015-05-17

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

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `Schema`

    - ### Fields inherited from class siena.comm.KAPacketReceiver

      `AcceptPollingInterval, DefaultMaxActiveConnections, DefaultPort, DefaultReceiveTimeout, receive_timeout`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SSLPacketReceiver(int pnumber)`
    `SSLPacketReceiver(int pnumber, int qsize)`
    `SSLPacketReceiver(javax.net.ssl.SSLServerSocket s)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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)`

    - ### 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`

- - ### 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.

    - #### 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-2011 Antonio Carzaniga.
This documentation is maintained by Antonio Carzaniga