|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.manplato.Transport.SLPTransportInterface
SLP Transport Abstract Class. This abstract class provides a standardized manner in which to define the possible transport mechanisms for a SLP packet, including various serial interfaces, and potentially through the embedding of SLP into other protocols.
Field Summary | |
protected java.lang.String |
portName
The name of the selected serial port, in device-dependent format. |
Constructor Summary | |
SLPTransportInterface(java.lang.String portName)
Creates a new SLPTransportInterface. |
Method Summary | |
abstract void |
close()
Closes the implemented transport. |
abstract void |
flush()
Flushes the input buffer of any remaining data. |
static java.lang.String |
getName()
Returns the name of this Transport Interface. |
static java.lang.String[] |
getPortNames()
Returns an array of Strings representing the names of available ports. |
java.lang.String |
getSelectedPortName()
Retrieves the port name for the active serial port. |
abstract void |
open()
Opens a read/write connection to the implemented transport. |
abstract byte |
readByte()
Read a single byte from the underlying data stream. |
abstract void |
setSpeed(int speed)
Changes the speed of the underlying transport mechanism. |
abstract void |
writeBytes(byte[] data)
Write an array of bytes to the underlying data stream. |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected java.lang.String portName
Constructor Detail |
public SLPTransportInterface(java.lang.String portName)
portName
- the device-dependent name of the port to open.Method Detail |
public abstract void close() throws java.lang.Exception
java.lang.Exception
- throws any required exception.public abstract void flush() throws java.io.IOException
thrown
- when a problem occurs with flushing the stream.public static java.lang.String getName()
public static java.lang.String[] getPortNames()
public java.lang.String getSelectedPortName()
public abstract void open() throws java.lang.Exception
java.lang.Exception
- any exception the underlying code may throw.public abstract byte readByte()
public abstract void setSpeed(int speed) throws java.lang.Exception
speed
- - The speed to set the transport to.java.lang.Exception
- any exception the underlying code may throw.public abstract void writeBytes(byte[] data)
data
- the bytes to be written to the underlying stream.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |