org.apache.mina.proxy.handlers.socks
Class Socks5LogicHandler

java.lang.Object
  extended by org.apache.mina.proxy.AbstractProxyLogicHandler
      extended by org.apache.mina.proxy.handlers.socks.AbstractSocksLogicHandler
          extended by org.apache.mina.proxy.handlers.socks.Socks5LogicHandler
All Implemented Interfaces:
ProxyLogicHandler

public class Socks5LogicHandler
extends AbstractSocksLogicHandler

Socks5LogicHandler.java - SOCKS5 authentication mechanisms logic handler.

Since:
MINA 2.0.0-M3
Version:
$Rev: 729187 $, $Date: 2008-12-24 02:28:51 +0100 (Wed, 24 Dec 2008) $
Author:
The Apache MINA Project (dev@mina.apache.org)

Field Summary
 
Fields inherited from class org.apache.mina.proxy.handlers.socks.AbstractSocksLogicHandler
request
 
Constructor Summary
Socks5LogicHandler(ProxyIoSession proxyIoSession)
          
 
Method Summary
protected  void closeSession(String message)
          Close the session.
 void doHandshake(IoFilter.NextFilter nextFilter)
          Perform the handshake process.
protected  void handleResponse(IoFilter.NextFilter nextFilter, IoBuffer buf, int step)
          Handle a SOCKS v5 response from the proxy server.
 void messageReceived(IoFilter.NextFilter nextFilter, IoBuffer buf)
          Handle incoming data during the handshake process.
 
Methods inherited from class org.apache.mina.proxy.AbstractProxyLogicHandler
closeSession, enqueueWriteRequest, flushPendingWriteRequests, getProxyFilter, getProxyIoSession, getSession, isHandshakeComplete, setHandshakeComplete, writeData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Socks5LogicHandler

public Socks5LogicHandler(ProxyIoSession proxyIoSession)

Method Detail

doHandshake

public void doHandshake(IoFilter.NextFilter nextFilter)
Perform the handshake process.

Parameters:
nextFilter - the next filter in filter chain

messageReceived

public void messageReceived(IoFilter.NextFilter nextFilter,
                            IoBuffer buf)
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

handleResponse

protected void handleResponse(IoFilter.NextFilter nextFilter,
                              IoBuffer buf,
                              int step)
                       throws Exception
Handle a SOCKS v5 response from the proxy server.

Throws:
Exception

closeSession

protected void closeSession(String message)
Close the session.

Overrides:
closeSession in class AbstractProxyLogicHandler


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