|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.quadrique.jbuildingblocks.core.io.socket.client.JbbSocketHandler
public class JbbSocketHandler
This class implements a synchronized pool of connection handler threads. Each thread is blocked waiting for a new connection request to handle. This is the base class that defines the common behavior of all connection handlers and it has to be overridden in a derived class that implements the connection handling itself.
| Method Summary | |
|---|---|
void |
closeConnection()
to releaseConnection the connection |
void |
newConnection(String zHostName,
int zPortNb)
to establish a socket connection to the given server |
static JbbSocketHandler |
newInstance()
|
String |
performHttp11Query(String zQuery,
int zNbOfLoops)
to perform a HTTP 1.1 query: this method analysis the http header of the response and reads as many as "content-length" bytes for the body (unless the connection is closed or any other i/o exception occurs or time-out occurs) |
String |
performRawQuery(String zQuery,
int zNbOfLoops)
to perform a raw query: this method doesn't know anything about the underlying protocol and the length of the data to be received. |
String |
readFileContent(String zFileName)
Read the content of the given file in a string |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static JbbSocketHandler newInstance()
public void newConnection(String zHostName,
int zPortNb)
throws Exception
Exception
public String readFileContent(String zFileName)
throws Exception
Exception
public String performRawQuery(String zQuery,
int zNbOfLoops)
throws Exception
Exception
public String performHttp11Query(String zQuery,
int zNbOfLoops)
throws Exception
Exception
public void closeConnection()
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||