|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rabbit.proxy.SWC
public class SWC
A class that tries to establish a connection to the real server or the next proxy in the chain.
Constructor Summary | |
---|---|
SWC(Connection con,
HttpHeader header,
TrafficLoggerHandler tlh,
ClientResourceHandler crh,
rabbit.proxy.RequestHandler rh)
|
Method Summary | |
---|---|
void |
clientResourceAborted(HttpHeader reason)
The transfer of the client resource has been aborted. |
void |
clientResourceTransferred()
The client resource have been successfully transferred. |
void |
closed()
The socket connection has been closed, either by this end or the other side. |
void |
connectionEstablished(WebConnection wc)
A connection has been made. |
void |
establish()
|
void |
failed(Exception e)
Reading failed |
void |
httpHeaderRead(HttpHeader header,
BufferHandle wbh,
boolean keepalive,
boolean isChunked,
long dataSize)
One http header has been read |
void |
httpHeaderSent()
The http header has been sent. |
void |
timeout()
The operation timed out |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SWC(Connection con, HttpHeader header, TrafficLoggerHandler tlh, ClientResourceHandler crh, rabbit.proxy.RequestHandler rh)
Method Detail |
---|
public void establish()
public void connectionEstablished(WebConnection wc)
WebConnectionListener
connectionEstablished
in interface WebConnectionListener
wc
- the now open connectionpublic void httpHeaderSent()
HttpHeaderSentListener
httpHeaderSent
in interface HttpHeaderSentListener
public void clientResourceTransferred()
ClientResourceTransferredListener
clientResourceTransferred
in interface ClientResourceTransferredListener
public void clientResourceAborted(HttpHeader reason)
ClientResourceTransferredListener
clientResourceAborted
in interface ClientResourceTransferredListener
reason
- the failure code.public void httpHeaderRead(HttpHeader header, BufferHandle wbh, boolean keepalive, boolean isChunked, long dataSize)
HttpHeaderListener
httpHeaderRead
in interface HttpHeaderListener
header
- the HttpHeader that was readwbh
- the BufferHandle that may or may not hold unread data.keepalive
- if the sender want to use keepalive.isChunked
- if false content is not chunked,
if true content is chunked.dataSize
- the contents size or -1 if size is unknown.public void closed()
HttpHeaderListener
closed
in interface HttpHeaderListener
public void timeout()
AsyncListener
timeout
in interface AsyncListener
timeout
in interface WebConnectionListener
public void failed(Exception e)
AsyncListener
failed
in interface AsyncListener
failed
in interface WebConnectionListener
e
- the real reason the operation failed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |