|
SunSPOT API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.spot.io.j2me.socket.SocketConnection
public class SocketConnection
This class provides the necessary implementation for a socket connection.
A SocketProxy must be running on the desktop in order to properly establish a connection.
The SocketConnection uses the following Manifest properties to establish the connection "com.sun.spot.io.j2me.socket.SocketConnection-BaseStationAddress" : IEEE address of the base station where the SocketProxy is running (can also be set as an argument to the VM) "com.sun.spot.io.j2me.socket.SocketConnection-BaseStationPort" : Radiogram port to connect to, where the SocketProxy is running. (can also be set as an argument to the VM)
Field Summary | |
---|---|
static String |
SOCKET_PROXY_BASE_STATION_ADDRESS_MANIFEST_PROPERTY
|
static String |
SOCKET_PROXY_BASE_STATION_PORT_MANIFEST_PROPERTY
|
Constructor Summary | |
---|---|
SocketConnection(ProxyInitializer initializer,
boolean timeouts)
Create a SocketConnection object. |
Method Summary | |
---|---|
void |
close()
Disconnect and close the SocketConnection. |
com.sun.spot.io.j2me.socket.SocketConnection.SocketInputStream |
getInputStream()
Get a SocketInputStream object associated to this conneciton. |
com.sun.spot.io.j2me.socket.SocketConnection.SocketOutputStream |
getOutputStream()
Get a SocketOutputStream object associated to this conneciton. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SOCKET_PROXY_BASE_STATION_ADDRESS_MANIFEST_PROPERTY
public static final String SOCKET_PROXY_BASE_STATION_PORT_MANIFEST_PROPERTY
Constructor Detail |
---|
public SocketConnection(ProxyInitializer initializer, boolean timeouts) throws IllegalArgumentException, IOException
initializer
- Initializer string to send the proxy to init the connection.timeouts
- set to true to use timeouts
IOException
- when unable to establish the connection with the proxy
IllegalArgumentException
- when the property "com.sun.spot.io.j2me.socket.SocketConnection-BaseStationAddress" is not set in the Manifest file or passed as an argument to the VM.Method Detail |
---|
public com.sun.spot.io.j2me.socket.SocketConnection.SocketInputStream getInputStream() throws IOException
IOException
public com.sun.spot.io.j2me.socket.SocketConnection.SocketOutputStream getOutputStream() throws IOException
IOException
public void close() throws IOException
IOException
|
SunSPOT API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |