Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ka2ddo.yaac.io
Class SslAprsIsConnector

    java.lang.Object
      org.ka2ddo.ax25.Connector
          org.ka2ddo.yaac.io.PortConnector
              org.ka2ddo.yaac.io.TransmittingPortConnector
                  org.ka2ddo.yaac.io.TNCConnector
                      org.ka2ddo.yaac.io.SslAprsIsConnector

All Implemented Interfaces:
  java.lang.Runnable, java.lang.Thread.UncaughtExceptionHandler, NeedsAppVersionInfoIfc, PortFailureReportListener

    public class SslAprsIsConnector

extends TNCConnector
implements java.lang.Runnable, java.lang.Thread.UncaughtExceptionHandler, PortFailureReportListener, NeedsAppVersionInfoIfc

This class defines a potentially bidirectional connection to an APRS-IS server, using SSL client authentication rather than passcodes to connect.

Nested Class Summary

Nested classes/interfaces inherited from class org.ka2ddo.ax25.Connector
`Connector.PortStats`

Field Summary
`static java.lang.String` | `CONFIG_GUI` Specify the fully-qualified platform-wildcarded class name for the editor for SslAprsIsConnector.
`static java.lang.String` | `TYPE_NAME` Specify the PortConnector type name for SslAprsIsConnector.

Fields inherited from class org.ka2ddo.yaac.io.PortConnector
`currentCfg, portConfig`

Fields inherited from class org.ka2ddo.ax25.Connector
`CAP_FULL_DUPLEX, CAP_GPS_DATA, CAP_HF, CAP_IGATE, CAP_OPENTRAC, CAP_RCV_PACKET_DATA, CAP_RF, CAP_WAYPOINT_SENDER, CAP_WEATHER, CAP_XMT_PACKET_DATA, stats`

Constructor Summary
`SslAprsIsConnector()`

Method Summary
`void` | `close()` Shut down this PortConnector.
`void` | `configure(PortConfig config)` Update the configuration of the connector to match the updated setup.
`static javax.net.ssl.SSLSocket` | `createSSLWrapperSocket(java.net.Socket tmpSocket, java.net.InetAddress inetAddress, PortConfig portConfig, PortFailureReportListener listener)` Wrap an SSL session around a plain TCP socket connection.
`void` | `failureGuiCreated(PortFailureReporterIfc failureGui)` Specify the lazily-created failure reporting GUI object for the reported failure.
`void` | `failureGuiDismissed()` The GUI object has been dismissed by the user and should not be used any more by the requesting I/O code.
`int` | `getBitRate()` Get the bit transmission rate on this port.
`int` | `getCapabilities()` Specify what capabilities a port of this type has.
`boolean` | `isOpen()` Reports whether this PortConnector has an open connection to its port.
`void` | `run()` Private internal method used to read the incoming APRS messages from the socket connection to the selected APRS-IS server.
`void` | `sendFrame(AX25Frame frame)` Transmit a AX.25 frame to the connected APRS-IS server.
`void` | `setAppVersion(java.lang.String name, java.lang.String version)` Sets the name and version of the containing application.
`java.lang.String` | `toString()` Returns a string representation of the SslAprsIsConnector object.
`void` | `uncaughtException(java.lang.Thread t, java.lang.Throwable e)` Method invoked when the given thread terminates due to the given uncaught exception.

Methods inherited from class org.ka2ddo.yaac.io.TNCConnector
`convertTNC2FormatToAX25Frame, getCallsign, getPortAddress, setPortAddress`

Methods inherited from class org.ka2ddo.yaac.io.PortConnector
`addFrameListener, addPortEventListener, createPort, fireConsumeFrame, fireConsumeFrame, fireFailed, fireReceiving, fireTransmitting, getPortConnectorClass, portConnectorClasses, portTypeNames, registerPortConnectorType, removeFrameListener, removePortEventListener, setPortConfig`

Methods inherited from class org.ka2ddo.ax25.Connector
`finalize, getStats, hasCapability`

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### TYPE_NAME

    public static final java.lang.String TYPE_NAME

  Specify the PortConnector type name for SslAprsIsConnector.

  See Also:
    Constant Field Values

### CONFIG_GUI

    public static final java.lang.String CONFIG_GUI

  Specify the fully-qualified platform-wildcarded class name for the editor for SslAprsIsConnector.

  See Also:
    Constant Field Values

Constructor Detail

### SslAprsIsConnector

    public SslAprsIsConnector()

Method Detail

### setAppVersion

    public void setAppVersion(java.lang.String name,
                              java.lang.String version)

  Sets the name and version of the containing application.

  Specified by:
    `setAppVersion` in interface `NeedsAppVersionInfoIfc`
  Parameters:
    `name` - String name of the application (cannot contain whitespace)
    `version` - String version of the application (cannot contain whitespace)

### configure

    public void configure(PortConfig config)
                   throws java.io.IOException,
                          java.lang.IllegalArgumentException

  Update the configuration of the connector to match the updated setup.

  Specified by:
    `configure` in class `PortConnector`
  Parameters:
    `config` - PortConfig defining new port settings
  Throws:
    `java.io.IOException` - if interface changes could not be applied
    `java.lang.IllegalArgumentException` - if type information is invalid for changing the settings of this PortConnector

### createSSLWrapperSocket

    public static javax.net.ssl.SSLSocket createSSLWrapperSocket(java.net.Socket tmpSocket,
                                                                 java.net.InetAddress inetAddress,
                                                                 PortConfig portConfig,
                                                                 PortFailureReportListener listener)
                                                          throws java.io.IOException

  Wrap an SSL session around a plain TCP socket connection.

  Parameters:
    `tmpSocket` - TCP (stream) socket connected to a server expecting SSL
    `inetAddress` - InetAddress of remote server
    `portConfig` - PortConfig record with the parameters for this connection
    `listener` - PortFailureReportListener (if any) to be informed if an error dialog is created
  Returns:
    SSLSocket wrapped around the original socket, or null if the SSL connection could not be established
  Throws:
    `java.io.IOException` - if SSL environment could not be set up

### isOpen

    public boolean isOpen()

  Reports whether this PortConnector has an open connection to its port.

  Specified by:
    `isOpen` in class `Connector`
  Returns:
    boolean true if PortConnector is open

### run

    public final void run()

  Private internal method used to read the incoming APRS messages from the socket connection to the selected APRS-IS server.

  Specified by:
    `run` in interface `java.lang.Runnable`

### getBitRate

    public int getBitRate()

  Get the bit transmission rate on this port.

  Overrides:
    `getBitRate` in class `TNCConnector`
  Returns:
    bit rate in bits per second

### failureGuiCreated

    public void failureGuiCreated(PortFailureReporterIfc failureGui)

  Specify the lazily-created failure reporting GUI object for the reported failure.

  Specified by:
    `failureGuiCreated` in interface `PortFailureReportListener`
  Parameters:
    `failureGui` - PortFailureReporterIfc object for the GUI
  See Also:
    `GuiIfc.showIOFailureDialog(org.ka2ddo.yaac.io.PortConfig, String, org.ka2ddo.yaac.io.PortFailureReportListener)`

### failureGuiDismissed

    public void failureGuiDismissed()

  The GUI object has been dismissed by the user and should not be used any more by the requesting I/O code.

  Specified by:
    `failureGuiDismissed` in interface `PortFailureReportListener`

### uncaughtException

    public final void uncaughtException(java.lang.Thread t,
                                        java.lang.Throwable e)

  Method invoked when the given thread terminates due to the given uncaught exception.

  Any exception thrown by this method will be ignored by the Java Virtual Machine.

  Specified by:
    `uncaughtException` in interface `java.lang.Thread.UncaughtExceptionHandler`
  Parameters:
    `t` - the thread
    `e` - the exception

### sendFrame

    public void sendFrame(AX25Frame frame)

  Transmit a AX.25 frame to the connected APRS-IS server. Note this will silently do nothing if the connection is not open or transmission is not enabled for this PortConnector.

  Specified by:
    `sendFrame` in class `TransmittingPortConnector`
  Parameters:
    `frame` - AX25Frame to transmit

### close

    public void close()

  Shut down this PortConnector.

  Overrides:
    `close` in class `Connector`

### toString

    public java.lang.String toString()

  Returns a string representation of the SslAprsIsConnector object.

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    a string representation of the object.

### getCapabilities

    public int getCapabilities()

  Specify what capabilities a port of this type has.

  Overrides:
    `getCapabilities` in class `Connector`
  Returns:
    bitmask of capability flags
  See Also:
    `Connector.CAP_RCV_PACKET_DATA`, `Connector.CAP_XMT_PACKET_DATA`, `Connector.CAP_FULL_DUPLEX`, `Connector.CAP_GPS_DATA`, `Connector.CAP_IGATE`, `Connector.CAP_OPENTRAC`, `Connector.CAP_RF`, `Connector.CAP_WAYPOINT_SENDER`, `Connector.CAP_WEATHER`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD