de.netseeker.ejoe.handler
Class ServerHandlerMapping

java.lang.Object
  extended by de.netseeker.ejoe.handler.ServerHandlerMapping
All Implemented Interfaces:
ServerHandler, java.io.Serializable

public class ServerHandlerMapping
extends java.lang.Object
implements ServerHandler

When using a ServerHandlerMapping with EJServer it is possible to use different ServerHandlers depending on the type of the used requests.

Since:
0.3.9.3
Author:
netseeker
See Also:
IRequest, Serialized Form

Constructor Summary
ServerHandlerMapping()
           
 
Method Summary
 void addHandlerMapping(java.lang.String uniqueName, ServerHandler serverHandler)
           
 java.lang.Object handle(java.lang.Object obj)
          Handles a client request
 boolean removeHandlerMapping(java.lang.String uniqueName)
           
 void setDefaultHandler(ServerHandler serverHandler)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerHandlerMapping

public ServerHandlerMapping()
Method Detail

handle

public java.lang.Object handle(java.lang.Object obj)
                        throws java.lang.Exception
Description copied from interface: ServerHandler
Handles a client request

Specified by:
handle in interface ServerHandler
Parameters:
obj - The input object transported by EJOE
Returns:
null or an valid return value. If you want return custom datatypes, eg. your own beans and don't want (or are not able) to deploy the classes of these datatypes on the client you can turn on EJOEs remote classloading feature.
Throws:
java.lang.Exception

addHandlerMapping

public void addHandlerMapping(java.lang.String uniqueName,
                              ServerHandler serverHandler)
Parameters:
uniqueName -
serverHandler -

removeHandlerMapping

public boolean removeHandlerMapping(java.lang.String uniqueName)
Parameters:
uniqueName -
Returns:

setDefaultHandler

public void setDefaultHandler(ServerHandler serverHandler)
Parameters:
serverHandler -


Copyright © 2005-2007 netseeker. All Rights Reserved.