DCT Lightfoot v3 API specification

com.dctl.j2me.io.httpserver
Class Connection

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

public class Connection
extends BaseConnection
implements StreamConnectionNotifier

Implement an http server class that can be used to handle web requests


Field Summary
 
Fields inherited from class com.dctl.j2me.io.BaseConnection
protocol
 
Constructor Summary
Connection()
          Default constructor
 
Method Summary
 StreamConnection acceptAndOpen()
          Wait for a connection to come in
 void close()
          Close the connection
 void setParameters(java.lang.String url, int mode, boolean timeouts)
          Open the connection by listening on the specified port, or port 80 by default
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Connection

public Connection()
Default constructor

Method Detail

setParameters

public void setParameters(java.lang.String url,
                          int mode,
                          boolean timeouts)
                   throws IOException
Open the connection by listening on the specified port, or port 80 by default

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 connection

Specified by:
close in interface Connection
Throws:
IOException - if there is a problem

acceptAndOpen

public StreamConnection acceptAndOpen()
                               throws IOException
Wait for a connection to come in

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