org.abstracthorizon.danube.http.spring
Class ApplicationSeparator

java.lang.Object
  extended by org.abstracthorizon.danube.http.spring.ApplicationSeparator
All Implemented Interfaces:
ConnectionHandler

public class ApplicationSeparator
extends Object
implements ConnectionHandler

This class is attended for categorisation of top level components. In other words it, currently, represents configuration for "application" within server.

This class passes request to another ConnectionHandler which is retrieved from another spring framework "application context".

Author:
Daniel Sendula

Field Summary
protected  ApplicationContext applicationContext
          Application context asked bean must reside it
protected  ConnectionHandler applicationsConnectionHandler
          Cached application's connection handler
protected  String beanName
          Name of ConnectionHandler bean name in given application context
 
Constructor Summary
ApplicationSeparator()
          Constructor
ApplicationSeparator(ApplicationContext applicationContext, String beanName)
          Constructor
 
Method Summary
 String getBeanName()
          Returns bean name
 ApplicationContext getChildContext()
          Returns sub application context bean is to be retrieved from
 void handleConnection(Connection connection)
          Passes execution flow to obtained ConnectionHandler
 void init()
          Obtains ConnectionHandler from given application context as a bean with given name.
 void setBeanName(String beanName)
          Sets bean name
 void setChildContext(ApplicationContext applicationContext)
          Sets sub application context bean is to be retrieved from
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

beanName

protected String beanName
Name of ConnectionHandler bean name in given application context


applicationContext

protected ApplicationContext applicationContext
Application context asked bean must reside it


applicationsConnectionHandler

protected ConnectionHandler applicationsConnectionHandler
Cached application's connection handler

Constructor Detail

ApplicationSeparator

public ApplicationSeparator()
Constructor


ApplicationSeparator

public ApplicationSeparator(ApplicationContext applicationContext,
                            String beanName)
Constructor

Parameters:
applicationContext - application context ConnectionHandler bean is retrieve from
beanName - bean name
Method Detail

handleConnection

public void handleConnection(Connection connection)
Passes execution flow to obtained ConnectionHandler

Specified by:
handleConnection in interface ConnectionHandler
Parameters:
connection - connection

init

public void init()
Obtains ConnectionHandler from given application context as a bean with given name.


getBeanName

public String getBeanName()
Returns bean name

Returns:
bean name

setBeanName

public void setBeanName(String beanName)
Sets bean name

Parameters:
beanName - bean name

getChildContext

public ApplicationContext getChildContext()
Returns sub application context bean is to be retrieved from

Returns:
sub application context bean is to be retrieved from

setChildContext

public void setChildContext(ApplicationContext applicationContext)
Sets sub application context bean is to be retrieved from

Parameters:
sub - applicationContext application context bean is to be retrieved from


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