|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mina.proxy.AbstractProxyLogicHandler
public abstract class AbstractProxyLogicHandler
AbstractProxyLogicHandler.java - Helper class to handle proxy handshaking logic. Derived classes implement proxy type specific logic.
Based upon SSLHandler from mina-filter-ssl.
Constructor Summary | |
---|---|
AbstractProxyLogicHandler(ProxyIoSession proxyIoSession)
Creates a new AbstractProxyLogicHandler . |
Method Summary | |
---|---|
protected void |
closeSession(String message)
|
protected void |
closeSession(String message,
Throwable t)
Close the session. |
void |
enqueueWriteRequest(IoFilter.NextFilter nextFilter,
WriteRequest writeRequest)
Enqueue a message to be written once handshaking is complete. |
protected void |
flushPendingWriteRequests()
Send any write requests which were queued whilst waiting for handshaking to complete. |
protected ProxyFilter |
getProxyFilter()
Returns the proxyFilter ProxyFilter . |
ProxyIoSession |
getProxyIoSession()
Returns the ProxyIoSession object. |
protected IoSession |
getSession()
Returns the session. |
boolean |
isHandshakeComplete()
Returns true if handshaking is complete and
data can be sent through the proxy. |
protected void |
setHandshakeComplete()
Signals that the shake has finished. |
void |
setProxySession(ProxyIoSession proxyIoSession)
|
protected WriteFuture |
writeData(IoFilter.NextFilter nextFilter,
IoBuffer data)
Write data to the proxy server. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.mina.proxy.ProxyLogicHandler |
---|
doHandshake, messageReceived |
Constructor Detail |
---|
public AbstractProxyLogicHandler(ProxyIoSession proxyIoSession)
AbstractProxyLogicHandler
.
proxyIoSession
- ProxyIoSession
in use.Method Detail |
---|
protected ProxyFilter getProxyFilter()
ProxyFilter
.
protected IoSession getSession()
public ProxyIoSession getProxyIoSession()
ProxyIoSession
object.
getProxyIoSession
in interface ProxyLogicHandler
public void setProxySession(ProxyIoSession proxyIoSession)
protected WriteFuture writeData(IoFilter.NextFilter nextFilter, IoBuffer data) throws UnsupportedEncodingException
nextFilter
- Downstream filter to receive data.data
- Data buffer to be written.
UnsupportedEncodingException
public boolean isHandshakeComplete()
true
if handshaking is complete and
data can be sent through the proxy.
isHandshakeComplete
in interface ProxyLogicHandler
protected final void setHandshakeComplete()
protected void flushPendingWriteRequests() throws Exception
Exception
public void enqueueWriteRequest(IoFilter.NextFilter nextFilter, WriteRequest writeRequest)
enqueueWriteRequest
in interface ProxyLogicHandler
protected void closeSession(String message, Throwable t)
protected void closeSession(String message)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |