|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.siemens.mp.misc.NativeMem
com.siemens.mp.io.Connection
The Connection class supports data transfer through SMS, IrDA and internal
SMS loopback interfaces.
It provides functionality for opening a bidirectional connection,
sending data on it, and associating with it an incoming data listener.
The listener object is an implementation of
ConnectionListener interface. When
associated to a specific connection, this objects'
receiveData
method will be called each time when incoming data is received.
ConnectionListener
| Constructor Summary | |
Connection(String connectTo)
Opens a new connection and creates a Connection object for it. |
|
| Method Summary | |
ConnectionListener |
getListener()
|
void |
send(byte[] data)
Sends data via the created connection. |
void |
setListener(ConnectionListener listener)
Registers a listener to receive data. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Connection(String connectTo)
connectTo - the connection type and destination address.
The following strings may be used to create specific connections:IllegalArgumentException - if SMS connection is used, and the number is not a correct phone-number
| Method Detail |
public void send(byte[] data)
throws NotAllowedException
data - a bytearray containing data to send
NotAllowedException - if SMS connection is used and the call is not acknowledgedConnection constructor
public void setListener(ConnectionListener listener)
ConnectionListener interface. When
associated to a specific connection, this objects'
receiveData
method will be called each time when incoming data is received.
listener - the ConnectionListener object
public ConnectionListener getListener()
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
| Generated on 2003-10-17 | For further information and updates, please visit Siemens mobile Developer Portal |