|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--de.trantor.mail.Connection
|
+--de.trantor.mail.http.ConnectionImpl
Provides a concrete descendent of the abstract "Connection" class that can be used in any J2ME environments. It relies only on HTTP, which is the only protocol that is mandatory in the Generic Connection Framework. The class implements the client side of a TCP-through-HTTP tunnel (which sounds somewhat absurd at first sight, but makes sense in the J2ME scenario). The server part is implemented by the servlet contained in the de.trantor.mail.proxy package.
Connection,
javax.microedition.io.HttpConnection| Constructor Summary | |
ConnectionImpl(java.lang.String proxyHost,
int proxyPort)
|
|
| Method Summary | |
void |
close()
Closes the connection. |
boolean |
connected()
Queries the current status of the connection. |
void |
open(java.lang.String host,
int port,
boolean ssl)
Opens a connection with the given host on the given port. |
protected int |
read(byte[] buffer,
int offset,
int count)
Reads from the socket. |
protected void |
write(byte[] buffer,
int offset,
int count)
Writes to the socket. |
| Methods inherited from class de.trantor.mail.Connection |
getDebug, getInstance, receive, send, setDebug |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ConnectionImpl(java.lang.String proxyHost,
int proxyPort)
| Method Detail |
public void open(java.lang.String host,
int port,
boolean ssl)
throws java.io.IOException
open in class Connectionjava.io.IOExceptionclose()
public void close()
throws java.io.IOException
close in class Connectionjava.io.IOExceptionopen(java.lang.String, int, boolean)
protected int read(byte[] buffer,
int offset,
int count)
throws java.io.IOException
Connection
read in class Connectionjava.io.IOException
protected void write(byte[] buffer,
int offset,
int count)
throws java.io.IOException
Connection
write in class Connectionjava.io.IOExceptionpublic boolean connected()
Connection
connected in class Connection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||