org.apache.mina.proxy
Interface ProxyLogicHandler

All Known Implementing Classes:
AbstractHttpLogicHandler, AbstractProxyLogicHandler, AbstractSocksLogicHandler, HttpSmartProxyHandler, Socks4LogicHandler, Socks5LogicHandler

public interface ProxyLogicHandler

ProxyLogicHandler.java - Interface implemented by classes containing proxy type specific logic.

Since:
MINA 2.0.0-M3
Author:
Apache MINA Project

Method Summary
 void doHandshake(IoFilter.NextFilter nextFilter)
          Called at each step of the handshake procedure.
 void enqueueWriteRequest(IoFilter.NextFilter nextFilter, WriteRequest writeRequest)
          Enqueue a message to be written once handshaking is complete.
 ProxyIoSession getProxyIoSession()
          Returns the ProxyIoSession.
 boolean isHandshakeComplete()
          Tests if handshake process is complete.
 void messageReceived(IoFilter.NextFilter nextFilter, IoBuffer buf)
          Handle incoming data during the handshake process.
 

Method Detail

isHandshakeComplete

boolean isHandshakeComplete()
Tests if handshake process is complete.

Returns:
true if handshaking is complete and data can be sent through the proxy, false otherwise.

messageReceived

void messageReceived(IoFilter.NextFilter nextFilter,
                     IoBuffer buf)
                     throws ProxyAuthException
Handle incoming data during the handshake process. Should consume only the handshake data from the buffer, leaving any extra data in place.

Parameters:
nextFilter - the next filter in the filter chain
buf - the buffer holding the received data
Throws:
ProxyAuthException - if authentication fails

doHandshake

void doHandshake(IoFilter.NextFilter nextFilter)
                 throws ProxyAuthException
Called at each step of the handshake procedure.

Parameters:
nextFilter - the next filter in filter chain
Throws:
ProxyAuthException - if authentication fails

getProxyIoSession

ProxyIoSession getProxyIoSession()
Returns the ProxyIoSession.

Returns:
the proxy session object

enqueueWriteRequest

void enqueueWriteRequest(IoFilter.NextFilter nextFilter,
                         WriteRequest writeRequest)
Enqueue a message to be written once handshaking is complete.

Parameters:
nextFilter - the next filter in filter chain
writeRequest - the data to be written


Copyright © 2004-2011 Apache MINA Project. All Rights Reserved.