|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrabbit.io.WebConnection
public class WebConnection
A class to handle a connection to the Internet.
Constructor Summary | |
---|---|
WebConnection(java.net.InetAddress ia,
int port,
boolean isProxyConnected,
java.lang.String proxyAuth,
Counter counter,
Logger logger,
NLSOHandler handler)
Create a new WebConnection to the given InetAddress and port. |
Method Summary | |
---|---|
boolean |
chunked()
Is this request chunked? |
void |
close()
Close the connection. |
long |
dataSize()
Get the size of the data being fetched. |
protected java.nio.channels.SocketChannel |
getChannel()
|
java.io.InputStream |
getChunkStream()
Get the last chunked page. |
java.net.InetAddress |
getInetAddress()
Get the InetAddress that this WebConnection is connected to. |
HTTPInputStream |
getInputStream()
Get the InputStream. |
boolean |
getKeepAlive()
Get the keepalive value of this WebConnection. |
HTTPOutputStream |
getOutputStream()
Get the OutputStream of this WebConnection. |
int |
getPort()
Get the port number this WebConnection is connected to. |
java.util.Date |
getReleasedAt()
Get the time that this WebConnection was released. |
protected java.nio.channels.SelectionKey |
getSelectionKey()
|
boolean |
getWaiting()
|
void |
setPipeline(boolean p)
|
void |
setReleased()
Mark this WebConnection as released at current time. |
void |
setReleased(java.util.Date d)
Mark this WebConnection as released at given time. |
protected void |
setSelectionKey(java.nio.channels.SelectionKey sk)
|
void |
writeHTTPHeader(HTTPHeader header)
Write an HTTP header on this connection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WebConnection(java.net.InetAddress ia, int port, boolean isProxyConnected, java.lang.String proxyAuth, Counter counter, Logger logger, NLSOHandler handler) throws java.io.IOException
ia
- the computer to connect to.port
- the port number to connect to.
java.io.IOException
Method Detail |
---|
public void close()
public void setPipeline(boolean p)
public boolean getWaiting()
public java.net.InetAddress getInetAddress()
public int getPort()
public void setReleased()
public void setReleased(java.util.Date d)
d
- the time that this WebConnection is released.public java.util.Date getReleasedAt()
protected void setSelectionKey(java.nio.channels.SelectionKey sk)
protected java.nio.channels.SelectionKey getSelectionKey()
protected java.nio.channels.SocketChannel getChannel()
public HTTPInputStream getInputStream()
public HTTPOutputStream getOutputStream()
public boolean getKeepAlive()
public long dataSize()
public boolean chunked()
public java.io.InputStream getChunkStream() throws java.io.IOException
java.io.IOException
public void writeHTTPHeader(HTTPHeader header) throws java.io.IOException
header
- the Header to write.
java.io.IOException
- if an I/O error occurs.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |