|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface IOPortListener
The listener interface for receiving I/O port events.
| Field Summary | ||
|---|---|---|
static int |
ERROR_FRAMING
Port framing error. |
|
static int |
ERROR_OVERRUN
Port overrun error. |
|
static int |
ERROR_PARITY
Port parity error. |
|
| Method Summary | ||
|---|---|---|
void |
connected()
Invoked when the port is connected. |
|
void |
dataReceived(int length)
Invoked when the port's receive queue has changed from empty to not empty. |
|
void |
dataSent()
Invoked when the port's transmit queue becomes completely empty. |
|
void |
disconnected()
Invoked when the port is disconnected. |
|
void |
patternReceived(byte[] pattern)
Invoked when a registered pattern is received. |
|
void |
receiveError(int error)
Invoked when a communication error has occurred. |
|
| Field Detail |
|---|
static final int ERROR_PARITY
static final int ERROR_FRAMING
static final int ERROR_OVERRUN
| Method Detail |
|---|
void connected()
On devices with a serial port, this occurs when the DTR line goes high.
void disconnected()
On devices with a serial port, this occurs when the DTR line goes low.
void receiveError(int error)
error - Error type (see this interface's fields).void dataReceived(int length)
length - Length of data received, or -1 if the length is not
available.void dataSent()
void patternReceived(byte[] pattern)
Applications can register a pattern to notice with
IOPort.registerNotifyPattern(byte[]). When no application has the
port open, and the system notices this pattern on the port, it invokes
this method on implementing applications.
pattern - Pattern detected.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal