|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
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 |
| Method Detail |
public void connected()
On devices with a serial port, this occurs when the DTR line goes high.
public void dataReceived(int length)
length - Length of data received, or -1 if the length is not
available.public void disconnected()
On devices with a serial port, this occurs when the DTR line goes low.
public 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.public void receiveError(int error)
error - Error type (see this interface's fields).
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2008 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.