DCT Lightfoot v3 API specification

com.dctl.j2me.io.serversocket
Class Connection

java.lang.Object
  |
  +--com.dctl.j2me.io.BaseConnection
        |
        +--com.dctl.j2me.io.serversocket.Connection
All Implemented Interfaces:
Connection, StreamConnectionNotifier

public class Connection
extends BaseConnection
implements StreamConnectionNotifier

Server sockets are used to allow external systems to connect to the device using a TCP/IP socket.
Server sockets are opened using the URL "serversocket://

:"


Field Summary
 
Fields inherited from class com.dctl.j2me.io.BaseConnection
protocol
 
Constructor Summary
Connection()
           
 
Method Summary
 StreamConnection acceptAndOpen()
          Accept and open an incoming connection
 void close()
          Close the underlying socket.
 void setParameters(java.lang.String url, int mode, boolean timeouts)
          Set the URL, mode and timeouts
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Connection

public Connection()
Method Detail

setParameters

public void setParameters(java.lang.String url,
                          int mode,
                          boolean timeouts)
                   throws IOException
Set the URL, mode and timeouts

Specified by:
setParameters in class BaseConnection
Parameters:
url - The URL passed to connector.open
mode - The mode passed to connector.open or DEFAULT
timeouts - true if timeout exceptions should occur
Throws:
IOException - if there is a problem

close

public void close()
           throws IOException
Close the underlying socket.

Specified by:
close in interface Connection
Throws:
IOException - if there is an error

acceptAndOpen

public StreamConnection acceptAndOpen()
                               throws IOException
Accept and open an incoming connection

Specified by:
acceptAndOpen in interface StreamConnectionNotifier
Returns:
the connection
Throws:
IOException - if there is an error

DCT Lightfoot v3 API specification

DCT Lightfoot v3 API specification