org.abstracthorizon.extend.server.deployment.danube
Class ThreadContextHandler

java.lang.Object
  extended by org.abstracthorizon.extend.server.deployment.danube.ThreadContextHandler
All Implemented Interfaces:
org.abstracthorizon.danube.connection.ConnectionHandler

public class ThreadContextHandler
extends Object
implements org.abstracthorizon.danube.connection.ConnectionHandler

This class represents thread context handler. This connection handler sets given module's class loader as context class loader for the thread it operaters under and then invokes further handler. It is helpful since rest of the chain executed after this connection handler have thread with context class loader as of given module's that loaded them.

Author:
Daniel Sendula

Field Summary
protected  org.abstracthorizon.danube.connection.ConnectionHandler handler
          Handler to be invoked
protected  Module module
          Module this thread is executing under
 
Constructor Summary
ThreadContextHandler(org.abstracthorizon.danube.connection.ConnectionHandler handler, Module module)
          Constructor
 
Method Summary
 void handleConnection(org.abstracthorizon.danube.connection.Connection connection)
          This method creates sets context path to be same as context path up to here plus this component's path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

module

protected Module module
Module this thread is executing under


handler

protected org.abstracthorizon.danube.connection.ConnectionHandler handler
Handler to be invoked

Constructor Detail

ThreadContextHandler

public ThreadContextHandler(org.abstracthorizon.danube.connection.ConnectionHandler handler,
                            Module module)
Constructor

Method Detail

handleConnection

public void handleConnection(org.abstracthorizon.danube.connection.Connection connection)
This method creates sets context path to be same as context path up to here plus this component's path. Component's path is reset to "/"

Specified by:
handleConnection in interface org.abstracthorizon.danube.connection.ConnectionHandler
Parameters:
connection - socket connection
Throws:
IOException - io exception


Copyright © 2005-2009 Abstract Horizon. All Rights Reserved.