DCT Lightfoot v3 API specification

com.dctl.j2me.io.http
Class Pool

java.lang.Object
  |
  +--com.dctl.j2me.io.http.Pool

public class Pool
extends Object

This pools all fasthttp connections so that they don't need to be created all the time. Ideally they would be stored in a hashtable, but we don't want to create objects unnecessarily which is the only way to find the object in the hash!


Constructor Summary
Pool()
           
 
Method Summary
static void add(Connection con)
          Put a connection back on the pool
static Connection open(java.lang.String url)
          Get a connection from the pool, or create a new connection
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pool

public Pool()
Method Detail

open

public static Connection open(java.lang.String url)
                       throws IOException
Get a connection from the pool, or create a new connection

Parameters:
url - The URL to use, complete with address and port
Throws:
IOException - if there is an entry

add

public static final void add(Connection con)
Put a connection back on the pool

Parameters:
con - The connection to put back

DCT Lightfoot v3 API specification

DCT Lightfoot v3 API specification