|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrabbit.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,
long timeOffset,
HttpHeader header,
ByteBuffer buffer,
TrafficLoggerHandler tlh,
ClientResourceHandler crh,
rabbit.proxy.Connection.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 other end closed the connection. |
void |
connectionEstablished(WebConnection wc)
A connection has been made. |
void |
establish()
|
void |
failed(Exception e)
Creating the connection failed. |
void |
httpHeaderRead(HttpHeader header,
ByteBuffer buffer,
boolean keepalive,
boolean isChunked,
long dataSize)
one http header has been read |
void |
httpHeaderSent()
The http header has been sent. |
void |
timeout()
Creating the connection 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,
long timeOffset,
HttpHeader header,
ByteBuffer buffer,
TrafficLoggerHandler tlh,
ClientResourceHandler crh,
rabbit.proxy.Connection.RequestHandler rh)
| Method Detail |
|---|
public void establish()
public void connectionEstablished(WebConnection wc)
WebConnectionListener
connectionEstablished in interface WebConnectionListenerwc - the now open connectionpublic void httpHeaderSent()
HttpHeaderSentListener
httpHeaderSent in interface HttpHeaderSentListenerpublic void clientResourceTransferred()
ClientResourceTransferredListener
clientResourceTransferred in interface ClientResourceTransferredListenerpublic void clientResourceAborted(HttpHeader reason)
ClientResourceTransferredListener
clientResourceAborted in interface ClientResourceTransferredListenerreason - the failure code.
public void httpHeaderRead(HttpHeader header,
ByteBuffer buffer,
boolean keepalive,
boolean isChunked,
long dataSize)
HttpHeaderListener
httpHeaderRead in interface HttpHeaderListenerheader - the HttpHeader that was readbuffer - the ByteBuffer 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 HttpHeaderListenerpublic void timeout()
WebConnectionListener
timeout in interface WebConnectionListenertimeout in interface AsyncListenerpublic void failed(Exception e)
WebConnectionListener
failed in interface WebConnectionListenerfailed in interface AsyncListenere - the real reason the operation failed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||