com.lightdev.app.trec.server.sam
Class SAMXmlRpcServer

java.lang.Object
  extended by org.apache.xmlrpc.XmlRpcServer
      extended by com.lightdev.app.trec.server.sam.SAMXmlRpcServer

public class SAMXmlRpcServer
extends XmlRpcServer

A special XmlRpcServer that keeps a reference to its handlers separate to the default Apache XML-RPC implementation. In addition, SAMXmlRpcServer by default creates an SAMAuthorizer handler for login, logout and password changes of logged in users. It uses a Gatekeeper object for authentication and authorization.

SAMXmlRpcServer uses a specific SAMXmlRpcWorker to implement authentication and authorization using SAM session ids on a method call level.

Version:
2, 28.12.2005
Author:
Ulrich Hilger, Light Development, http://www.lightdev.com, info@lightdev.com, published under the terms and conditions of the BSD License, for details see file license.txt in the distribution package of this software

Constructor Summary
SAMXmlRpcServer(Gatekeeper g)
          construct a new instance of a SAMXmlRpcServer oject
 
Method Summary
 void addHandler(String handlerName, Agent handler)
          add a handler object to this server
protected  XmlRpcWorker createWorker()
          create an XmlRpcWorker suitable for this server object
 void destroy()
          destroy this object
 Agent getAgent(String agentName)
          get the agent with the given name
 Enumeration getAgentNames()
          get the names of all agents of this server
 Gatekeeper getGatekeeper()
          get the gatekeeper this server uses for authentication and authorization
 void removeHandler(String handlerName)
          remove a handler object from this server
 
Methods inherited from class org.apache.xmlrpc.XmlRpcServer
addHandler, execute, execute, execute, getHandlerMapping, getMaxThreads, getWorker, setMaxThreads
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAMXmlRpcServer

public SAMXmlRpcServer(Gatekeeper g)
construct a new instance of a SAMXmlRpcServer oject

Parameters:
g - the gatekeeper to use for authentication and authorization
Method Detail

addHandler

public void addHandler(String handlerName,
                       Agent handler)
add a handler object to this server

Parameters:
handlerName - the name to be exposed to clients
handler - the agent to add under the given name

removeHandler

public void removeHandler(String handlerName)
remove a handler object from this server

Overrides:
removeHandler in class XmlRpcServer
Parameters:
handlerName - the name of the handler to remove

getAgent

public Agent getAgent(String agentName)
get the agent with the given name

Parameters:
agentName - name of agent to get
Returns:
the agent with the given name or null

getAgentNames

public Enumeration getAgentNames()
get the names of all agents of this server

Returns:
the agent names

getGatekeeper

public Gatekeeper getGatekeeper()
get the gatekeeper this server uses for authentication and authorization

Returns:
the gatekeeper

createWorker

protected XmlRpcWorker createWorker()
create an XmlRpcWorker suitable for this server object

Overrides:
createWorker in class XmlRpcServer

destroy

public void destroy()
destroy this object