|
jSyncManager | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.jSyncManager.API.Transport.SLPTransportInterface | +--org.jSyncManager.Transport.ModemTransport
Modem Communications Transport. This transport, based on the Sun Communications API provides additional connection and configuration methods required for synchronizing through a modem connection. It assumes a modem with a standard response set.
Field Summary | |
---|---|
protected javax.swing.JComboBox |
comSelectBox
A combo box to hold the communications port names. |
protected boolean |
connected
Serial connectivity flag. |
static java.lang.String |
DEFAULT_INIT_STRING
The default init string to use if none is specified by the user. |
static int |
DEFAULT_SPEED
The default serial speed to use if none is specified. |
protected java.io.DataInputStream |
dis
The input data stream attached to the selected serial port. |
protected java.io.DataOutputStream |
dos
The output data stream attached to the selected serial port. |
protected java.lang.String |
initString
The initialization string used to setup the modem. |
protected javax.swing.JTextField |
initStringField
A GUI field to display/edit/modify the modem init string. |
protected boolean |
modemConnected
Modem connectivity flag. |
protected javax.comm.CommPortIdentifier |
port
Hold a handle to the underlying CommPortIdentifier object for the selected serial port. |
protected java.lang.String |
portName
The platform-specific name of the serial port in use. |
protected javax.comm.SerialPort |
ser
The selected serial port object. |
protected static int |
serialSpeed
The serial speed to use for the serial port connected to the modem. |
protected javax.swing.JComboBox |
speedSelectBox
A combo box to hold the serial port speeds. |
Fields inherited from class org.jSyncManager.API.Transport.SLPTransportInterface |
---|
configPanel |
Constructor Summary | |
---|---|
ModemTransport()
Creates a new instance of the ModemTransport class. |
Method Summary | |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e)
Method that is called whenever an action is performed. |
void |
close()
Closes the Java COMM API port. |
protected javax.swing.JPanel |
constructConfigPanel()
Constructs this transports configuration panel. |
void |
disconnect()
This method is used to flag that the modem is disconnected. |
protected void |
finalize()
Finalizes this ModemTransport object by closing it's connection. |
void |
flush()
Flushes the input buffer of any remaining data. |
java.lang.String |
getResourceBundleName()
Returns the fully-qualified classname for the resources package to use for this transport. |
java.lang.String |
getTransportDescription()
Returns the description for this Transport Interface. |
java.lang.String |
getTransportExceptionText(TransportException ex)
Retrieves error information for a given TransportException. |
java.lang.String |
getTransportName()
Returns the name of this Transport Interface. |
void |
initialize()
Initialize the port. |
void |
initialize(java.util.Properties properties,
int id)
Initialize the port. |
void |
open()
Opens a read/write connection to the implemented transport. |
byte |
readByte()
Read a single byte from the Java COMM API port. |
java.lang.String |
toString()
Returns settings information on this transport as a String. |
void |
writeBytes(byte[] data)
Writes an array of bytes to the Java COMM API port. |
Methods inherited from class org.jSyncManager.API.Transport.SLPTransportInterface |
---|
getConfigPanel, getResourceBundle, isConnected, loadResourceBundle, setConnected |
Methods inherited from class java.lang.Object |
---|
|
Field Detail |
public static final int DEFAULT_SPEED
public static final java.lang.String DEFAULT_INIT_STRING
protected transient javax.comm.CommPortIdentifier port
protected transient javax.comm.SerialPort ser
protected transient java.io.DataInputStream dis
protected transient java.io.DataOutputStream dos
protected transient boolean connected
protected transient boolean modemConnected
protected java.lang.String portName
protected java.lang.String initString
protected static int serialSpeed
protected transient javax.swing.JComboBox comSelectBox
protected transient javax.swing.JComboBox speedSelectBox
protected transient javax.swing.JTextField initStringField
Constructor Detail |
public ModemTransport() throws TransportException
TransportException
- any exception thrown by the underlying serial handler.Method Detail |
public void close() throws TransportException
close
in class SLPTransportInterface
TransportException
- any exception encountered is rethrown.public void disconnect()
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
- as per Object.finalize().public void flush() throws TransportException
flush
in class SLPTransportInterface
TransportException
- thrown when a problem occurs with flushing the stream.public java.lang.String getTransportName()
getTransportName
in class SLPTransportInterface
public void open() throws TransportException
open
in class SLPTransportInterface
TransportException
- thrown when a problem occurs with flushing the stream.public byte readByte()
readByte
in class SLPTransportInterface
public void writeBytes(byte[] data)
writeBytes
in class SLPTransportInterface
data
- the bytes to be written to the serial port.protected javax.swing.JPanel constructConfigPanel()
constructConfigPanel
in class SLPTransportInterface
public void initialize() throws TransportException
initialize
in class SLPTransportInterface
TransportException
- thrown if there isn't sufficient info to setup the transport,
or if another exception has occurred.public void initialize(java.util.Properties properties, int id) throws TransportException
initialize
in class SLPTransportInterface
properties
- a reference to the properties file containing configuration information.id
- the transport ID number to load data for.TransportException
- if there is a problem initializing the transport.public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
e
- the ActionEvent object for the event to be processed.public java.lang.String getTransportExceptionText(TransportException ex)
getTransportExceptionText
in class SLPTransportInterface
ex
- the TransportException to be inspected.public java.lang.String getResourceBundleName()
getResourceBundleName
in class SLPTransportInterface
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getTransportDescription()
getTransportDescription
in class SLPTransportInterface
|
jSyncManager | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |