| |
|
| java.lang.Object com.sun.midp.jsr82emul.EmulationClient com.sun.midp.jsr82emul.ConnectionEmul
Field Summary | |
final static int | CONN_CLOSE Request code for Close operation. | final static int | CONN_INIT Request code for Init operation. | final static int | CONN_OPEN Request code for Open operation. | final static int | CONN_RECEIVE Request code for Receive operation. | final static int | CONN_SEND Request code for Send operation. | public int | handle Handle that identifies this connection emulation. | ServiceConnectionData | serviceData Options of service to connect to. |
Method Summary | |
public void | close() Close this connection emulation. | public int | getReceiveMTU() Returns actually established ReceiveMTU. | public String | getRemoteAddress() Returns Bluetooth address of other side of this connection. | public int | getTransmitMTU() Returns actually established TransmitMTU. | native static void | notifyReceived(int handle, byte[] bytes, int len) Notifies porting layer on receive operation completion. | native static void | notifySent(int handle, int len) Notifies porting layer on send operation completion. | public int | open() Opens client-side connection. | public int | open(SocketConnection socketConnection) Opens server-side connection, i.e. | public void | process(BytePack request) Processes request from porting layer to emulation. |
CONN_CLOSE | final static int CONN_CLOSE(Code) | | Request code for Close operation.
|
CONN_INIT | final static int CONN_INIT(Code) | | Request code for Init operation.
|
CONN_OPEN | final static int CONN_OPEN(Code) | | Request code for Open operation.
|
CONN_RECEIVE | final static int CONN_RECEIVE(Code) | | Request code for Receive operation.
|
CONN_SEND | final static int CONN_SEND(Code) | | Request code for Send operation.
|
handle | public int handle(Code) | | Handle that identifies this connection emulation.
|
ConnectionEmul | public ConnectionEmul(int handle)(Code) | | Constructs an instance with given handle. Handle is an
integer value that identifies correspondence between connections
in porting layer nd ConnectionEmul instances. In case of client
side connection handle is already defined in native
create_client() functions. In case of server side
it is generated in another constructor.
Parameters: handle - handle receieved form native layer. |
ConnectionEmul | public ConnectionEmul(ServiceConnectionData serviceData)(Code) | | Constructs an instance at server side.
Parameters: serviceData - connection options passed by notifier that creates this connection. |
close | public void close()(Code) | | Close this connection emulation.
|
getReceiveMTU | public int getReceiveMTU()(Code) | | Returns actually established ReceiveMTU.
established ReceiveMTU. |
getRemoteAddress | public String getRemoteAddress()(Code) | | Returns Bluetooth address of other side of this connection.
Bluetooth address of the other side |
getTransmitMTU | public int getTransmitMTU()(Code) | | Returns actually established TransmitMTU.
established TransmitMTU. |
notifyReceived | native static void notifyReceived(int handle, byte[] bytes, int len)(Code) | | Notifies porting layer on receive operation completion.
Parameters: handle - connection handle Parameters: bytes - bytes received Parameters: len - amount of bytes received, Const.CONN_FAILURE if receiving failed, Const.CONN_ENDOF_INP ifthere is nothing to receive due reaching end of input stream. |
notifySent | native static void notifySent(int handle, int len)(Code) | | Notifies porting layer on send operation completion.
Parameters: handle - connection handle Parameters: len - amount of bytes sent, CONN_FAILURE if sendingfailed |
open | public int open() throws IOException(Code) | | Opens client-side connection. Requests connection with given client
connection string from emulation server
handle value exception: IOException - if communication to emulation server or a service fails. |
open | public int open(SocketConnection socketConnection) throws IOException(Code) | | Opens server-side connection, i.e. assigns this emulation with already
open server-side socket connection.
Parameters: socketConnection - already open server-side socket connection. handle value exception: IOException - if communication to emulation server or a service fails. |
process | public void process(BytePack request)(Code) | | Processes request from porting layer to emulation.
Parameters: request - packed request to process |
|
|
|