org.directwebremoting.impl
Class DefaultServerContextBuilder

java.lang.Object
  extended by org.directwebremoting.impl.DefaultServerContextBuilder
All Implemented Interfaces:
Builder<ServerContext>, ServerContextFactory.ServerContextBuilder

public class DefaultServerContextBuilder
extends java.lang.Object
implements ServerContextFactory.ServerContextBuilder

A ServerContextBuilder that creates DefaultServerContexts.

Author:
Joe Walker [joe at getahead dot ltd dot uk]

Constructor Summary
DefaultServerContextBuilder()
           
 
Method Summary
 ServerContext attach(Container container)
          This method should be called during setup only.
 ServerContext get()
          Get the object that is associated with this thread, assuming that there is no confusion over the current ServerContext.
 ServerContext get(ServerContext context)
          Get the object that is associated with this thread, whilst specifying the correct ServerContext.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultServerContextBuilder

public DefaultServerContextBuilder()
Method Detail

get

public ServerContext get()
Description copied from interface: Builder
Get the object that is associated with this thread, assuming that there is no confusion over the current ServerContext. There is more than one ServerContext then you need to use Builder.get(ServerContext) to ensure that the correct one is used.

Specified by:
get in interface Builder<ServerContext>
Returns:
The object associated with this DWR instance

get

public ServerContext get(ServerContext context)
Description copied from interface: Builder
Get the object that is associated with this thread, whilst specifying the correct ServerContext.

Specified by:
get in interface Builder<ServerContext>
Parameters:
context - The web application environment
Returns:
The object that is associated with this web application

attach

public ServerContext attach(Container container)
Description copied from interface: Builder
This method should be called during setup only. This is a bit like InitializingBean.afterContainerSetup(org.directwebremoting.Container) except that it is called by Factory.attach(org.directwebremoting.Container) which is called after the container has finished setting itself up so we can rely on ServerContextFactory.get() working.

Specified by:
attach in interface Builder<ServerContext>

Copyright 2008