|
jSyncManager | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.jSyncManager.API.Protocol.SLP
The Serial Link Protocol Handler class. This class provides the black-box for handling SLP packets.
| Inner Class Summary | |
|---|---|
(package private) class |
SLP.InputHandler
The SLP Input Handler class. |
(package private) class |
SLP.OutputHandler
The SLP Output Handler class. |
| Field Summary | |
|---|---|
static byte |
CONSOLE_SOCKET
The console socket. |
static byte |
DEBUG_SOCKET
The debug socket. |
static byte |
DLP_SOCKET
The Desktop Link Protocol Socket Note: all standard data synchronization occurs within the DLP socket. |
static boolean |
ENABLE_PKT_DUMP
A field to flag wether or not packet dumping should be enabled for all SLP protocol handler instances. |
static byte |
FIRST_SOCKET
The first available user socket. |
static byte |
NEXT_SOCKET
The next available socket value. |
static byte |
REMOTE_UI_SOCKET
The remote UI socket. |
| Constructor Summary | |
|---|---|
SLP(SLPTransportInterface trans)
Construct a new SLP protocol handler using the specified transport. |
|
| Method Summary | |
|---|---|
(package private) static void |
|
void |
connect()
Initialize the connection to the remote SLP provider. |
void |
disconnect()
Disconnects the protocol stack from the underlying transport. |
void |
enableDebugMode()
Enables debug mode, providing packet output to the set PrintStream. |
protected void |
handleCMPPacket(SLP_Packet pkt)
A handler for CMP packets. |
protected void |
handlePADPacket(SLP_Packet pkt)
A handler for PAD Packets. |
protected void |
handleSystemPacket(SLP_Packet pkt)
A handler for System Packets. |
protected void |
handleTestPacket(SLP_Packet pkt)
A handler for Test Packets. |
protected int |
incInputQueueEnd()
Increment the end pointer for the input queue. |
protected int |
incInputQueueStart()
Increment the start pointer for the input queue. |
protected int |
incOutputQueueEnd()
Increment the end pointer for the output queue. |
protected int |
incOutputQueueStart()
Increment the start pointer for the output queue. |
GenericPacket |
readPacket()
Reads the next packet from the input queue. |
void |
setDebugOutputStream(java.io.PrintStream stream)
Sets the print stream to use for debug output. |
void |
writePacket(byte[] data,
byte src,
byte dest,
byte transID)
Writen a packet of data via the SLP protocol to the other end of the transfer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final byte DEBUG_SOCKET
public static final byte CONSOLE_SOCKET
public static final byte REMOTE_UI_SOCKET
public static final byte DLP_SOCKET
public static final byte FIRST_SOCKET
public static byte NEXT_SOCKET
public static boolean ENABLE_PKT_DUMP
| Constructor Detail |
public SLP(SLPTransportInterface trans)
trans - an initialized transport to use for data I/O.| Method Detail |
static void()
public void connect()
public void disconnect()
public void enableDebugMode()
protected void handleCMPPacket(SLP_Packet pkt)
pkt - the SLP packet received.CMP_DLPprotected void handlePADPacket(SLP_Packet pkt)
pkt - the SLP packet received.protected void handleSystemPacket(SLP_Packet pkt)
pkt - the SLP packet received.protected void handleTestPacket(SLP_Packet pkt)
pkt - the SLP packet received.
protected int incInputQueueEnd()
throws SLP_QueueOverrunException
SLP_QueueOverrunException - if the input queue is overrun.
protected int incInputQueueStart()
throws SLP_QueueOverrunException
SLP_QueueOverrunException - if the input queue is underrun.
protected int incOutputQueueEnd()
throws SLP_QueueOverrunException
SLP_QueueOverrunException - if the output queue is overrun.
protected int incOutputQueueStart()
throws SLP_QueueOverrunException
SLP_QueueOverrunException - if the output queue is underrun.
public GenericPacket readPacket()
throws NotConnectedException
NotConnectedException - thrown if the SLP protocol isn't corrected when
this method is called, or if the connection is lost while waiting for the next packet.public void setDebugOutputStream(java.io.PrintStream stream)
stream - the PrintStream object to use for debug output.
public void writePacket(byte[] data,
byte src,
byte dest,
byte transID)
throws NotConnectedException
data - the data to be encapsulated in an SLP_Packet object and placed in the output queue.src - the source socket.dest - the destination socket.transID - the transaction ID for the packet.NotConnectedException - thrown if the SLP handler isn't connected to a remote SLP system,
or if the connection is lost during packet processing.
|
jSyncManager | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||