|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.scache.WebConnection
A class to handle a open connection to the Internet.
Field Summary | |
java.net.InetAddress |
ia
|
boolean |
keepalive
|
int |
port
|
long |
releasedAt
|
java.net.Socket |
socket
|
java.io.DataInputStream |
webis
|
java.io.DataOutputStream |
webos
|
Constructor Summary | |
WebConnection(java.io.DataInputStream is)
|
|
WebConnection(java.net.InetAddress ia,
int port)
Create a new WebConnection to the given InetAddress and port. |
Method Summary | |
void |
close()
Close the connection. |
java.net.InetAddress |
getInetAddress()
Get the InetAddress that this WebConnection is connected to. |
java.io.DataInputStream |
getInputStream()
Get the InputStream. |
boolean |
getKeepAlive()
Get the keepalive value of this WebConnection. |
java.io.DataOutputStream |
getOutputStream()
Get the OutputStream of this WebConnection. |
int |
getPort()
Get the port number this WebConnection is connected to. |
long |
getReleasedAt()
Get the time that this WebConnection was released. |
void |
reconnect()
|
void |
setKeepAlive(boolean ka)
|
void |
setReleased()
Mark this WebConnection as released at current time. |
void |
setReleased(long d)
Mark this WebConnection as released at given time. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public java.net.Socket socket
public java.io.DataInputStream webis
public java.io.DataOutputStream webos
public java.net.InetAddress ia
public int port
public long releasedAt
public boolean keepalive
Constructor Detail |
public WebConnection(java.net.InetAddress ia, int port) throws java.io.IOException
port
- the port number to connect to.public WebConnection(java.io.DataInputStream is)
Method Detail |
public void reconnect() throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException
public java.net.InetAddress getInetAddress()
public int getPort()
public void setReleased()
public void setReleased(long d)
d
- the time that this WebConnection is released.public long getReleasedAt()
public java.io.DataInputStream getInputStream()
public java.io.DataOutputStream getOutputStream()
public boolean getKeepAlive()
public void setKeepAlive(boolean ka)
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |