public class SslAprsIsConnector extends TNCConnector implements java.lang.Runnable, java.lang.Thread.UncaughtExceptionHandler, PortFailureReportListener, NeedsAppVersionInfoIfc, HasRemoteAppIfc, TransmittingConnector
PortConnector.PortStatsTypeConnector.ConnectorType, Connector.PortStats| Modifier and Type | Field and Description |
|---|---|
static java.util.Set<PortConfig.Fields> |
BLANK_FIELDS
Set of PortConfig field identifiers for fields that should not be copied from another system and should therefore be
blanked out when copying configuration files.
|
static java.lang.String |
CONFIG_GUI
Specify the fully-qualified platform-wildcarded class name for the editor for SslAprsIsConnector.
|
static java.util.Map<PortConfig.Fields,PortConfig.RequireHints> |
REQ_FIELDS
List of PortConfig field identifiers that are mandated for this port type to work, and the ResourceBundle key to
prompt for a value if missing.
|
static java.lang.String |
TYPE_NAME
Specify the PortConnector type name for SslAprsIsConnector.
|
RF_SEND_TIME_PER_BYTE_1200, RF_SEND_TIME_PER_BYTE_300, RF_SEND_TIME_PER_BYTE_9600, timeslotTimercurrentCfg, portConfigCAP_ADSB, CAP_APRS, CAP_FAST_RF_9600, CAP_FULL_DUPLEX, CAP_GPS_DATA, CAP_HF, CAP_IGATE, CAP_KENWOOD_CMD, CAP_OPENTRAC, CAP_OTHER_TRANSPORT, CAP_RAW_AX25, CAP_RCV_PACKET_DATA, CAP_RF, CAP_SUBCLIENT, CAP_WAYPOINT_SENDER, CAP_WEATHER, CAP_XMT_PACKET_DATA, stats| Constructor and Description |
|---|
SslAprsIsConnector() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
static void |
fillinConfigDefaults(PortConfig.Cfg cfg)
Set the correct defaults for a port in process of being created.
|
int |
getAcceptableProtocolsMask()
Get the bitmask of AX.25 protocols supported by this port.
|
int |
getBitRate()
Get the bit transmission rate on this port.
|
int |
getCapabilities()
Specify what capabilities a port of this type has.
|
java.net.InetSocketAddress |
getCurrentConnectAddress()
Return the address of the remote APRS-IS server this port is connected to.
|
long |
getPortOpenTime()
Return the time (in milliseconds since epoch) of when the connection to the
remote application was opened.
|
java.lang.String[] |
getRemoteAppAndVersion()
Get the application and version thereof of the remote application this Connector
is connected to.
|
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.
|
convertTNC2FormatToAX25Frame, getCallsign, getPortAddress, getRFSendTimePerByte, setPortAddressaddPortEventListener, createPort, fillinConfigDefaultsForType, fireFailed, fireReceiving, fireTransmitting, getCollectedStatsTypes, getPortConfig, getPortConnectorClass, getPortConnectorInactivityTimer, getStats, portConnectorClasses, portTypeNames, registerPortConnectorType, removePortEventListener, setPortConfigaddFrameListener, finalize, fireConsumeFrame, fireConsumeFrame, getStats, getType, hasCapability, removeFrameListenerclone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCallsign, getStats, hasCapabilitypublic static final java.lang.String TYPE_NAME
public static final java.lang.String CONFIG_GUI
public static final java.util.Set<PortConfig.Fields> BLANK_FIELDS
public static final java.util.Map<PortConfig.Fields,PortConfig.RequireHints> REQ_FIELDS
public static void fillinConfigDefaults(PortConfig.Cfg cfg)
cfg - PortConfig.Cfg whose defaults should be adjustedpublic void setAppVersion(java.lang.String name,
java.lang.String version)
setAppVersion in interface NeedsAppVersionInfoIfcname - String name of the application (cannot contain whitespace)version - String version of the application (cannot contain whitespace)public void configure(PortConfig config) throws java.io.IOException, java.lang.IllegalArgumentException
configure in class PortConnectorconfig - PortConfig defining new port settingsjava.io.IOException - if interface changes could not be appliedjava.lang.IllegalArgumentException - if type information is invalid for
changing the settings of this PortConnectorpublic static javax.net.ssl.SSLSocket createSSLWrapperSocket(java.net.Socket tmpSocket,
java.net.InetAddress inetAddress,
PortConfig portConfig,
PortFailureReportListener listener)
throws java.io.IOException
tmpSocket - TCP (stream) socket connected to a server expecting SSLinetAddress - InetAddress of remote serverportConfig - PortConfig record with the parameters for this connectionlistener - PortFailureReportListener (if any) to be informed if an error dialog is createdjava.io.IOException - if SSL environment could not be set uppublic boolean isOpen()
isOpen in interface TransmittingConnectorisOpen in class Connectorpublic final void run()
run in interface java.lang.Runnablepublic int getBitRate()
getBitRate in class TNCConnectorpublic java.lang.String[] getRemoteAppAndVersion()
getRemoteAppAndVersion in interface HasRemoteAppIfcpublic long getPortOpenTime()
getPortOpenTime in interface HasRemoteAppIfcpublic void failureGuiCreated(PortFailureReporterIfc failureGui)
failureGuiCreated in interface PortFailureReportListenerfailureGui - PortFailureReporterIfc object for the GUIGuiIfc.showIOFailureDialog(org.ka2ddo.yaac.io.PortConfig, String, org.ka2ddo.yaac.io.PortFailureReportListener)public void failureGuiDismissed()
failureGuiDismissed in interface PortFailureReportListenerpublic java.net.InetSocketAddress getCurrentConnectAddress()
getCurrentConnectAddress in interface HasRemoteAppIfcpublic final void uncaughtException(java.lang.Thread t,
java.lang.Throwable e)
Any exception thrown by this method will be ignored by the Java Virtual Machine.
uncaughtException in interface java.lang.Thread.UncaughtExceptionHandlert - the threade - the exceptionpublic void sendFrame(AX25Frame frame)
sendFrame in interface TransmittingConnectorframe - AX25Frame to transmitpublic java.lang.String toString()
toString in class java.lang.Objectpublic int getCapabilities()
getCapabilities in interface TransmittingConnectorgetCapabilities in class ConnectorConnector.CAP_APRS,
Connector.CAP_RCV_PACKET_DATA,
Connector.CAP_XMT_PACKET_DATA,
Connector.CAP_FAST_RF_9600,
Connector.CAP_FULL_DUPLEX,
Connector.CAP_GPS_DATA,
Connector.CAP_HF,
Connector.CAP_IGATE,
Connector.CAP_KENWOOD_CMD,
Connector.CAP_OPENTRAC,
Connector.CAP_ADSB,
Connector.CAP_RAW_AX25,
Connector.CAP_RF,
Connector.CAP_WAYPOINT_SENDER,
Connector.CAP_WEATHER,
Connector.CAP_SUBCLIENT,
Connector.CAP_OTHER_TRANSPORTpublic int getAcceptableProtocolsMask()
getAcceptableProtocolsMask in interface TransmittingConnectorgetAcceptableProtocolsMask in class TNCConnector