com.lightdev.app.trec.server.sam
Class SAMXmlRpcWorker
java.lang.Object
org.apache.xmlrpc.XmlRpcWorker
com.lightdev.app.trec.server.sam.SAMXmlRpcWorker
public class SAMXmlRpcWorker
- extends XmlRpcWorker
An XmlRpcWorker that applies authentication and authorization to all client
requests. The worker expects a SAM session id as the first parameter of each
client request. Once properly authorized client requests are passed to the appropriate
handler with the session id removed. When authorization fails an AccessException is
thrown instead.
SAMXmlRpcWorker expects a SAMXmlRpcServer in its constructor to be sure, that
an Authorizer handler, a Gatekeeper and SAMApplications are present. Client requests to methods
login, logout and changeOwnPassword are
passed without authentication and are routed to the Authorizer handler automatically.
- 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
|
Method Summary |
byte[] |
execute(InputStream is,
XmlRpcContext context)
execute an XML-RPC client request
This method passes on all method calls to non SAMApplication handlers as well as
all calls to methods login, logout and
changeOwnPassword. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SAMXmlRpcWorker
public SAMXmlRpcWorker(XmlRpcHandlerMapping handlerMapping,
SAMXmlRpcServer s)
- construct a new instance of a SAMXmlRpcWorker object
- Parameters:
handlerMapping - the hanlder mappings - the XmlRpcServer havin Gatekeeper, Authorizer and SAMApplications
execute
public byte[] execute(InputStream is,
XmlRpcContext context)
- execute an XML-RPC client request
This method passes on all method calls to non SAMApplication handlers as well as
all calls to methods login, logout and
changeOwnPassword. All other client requests are expected to have
a SAM session id as their first parameter. The session id is used to authenticate
and authorize the caller. Once proper authorized the call is passed on to the appropriate
handler with the session id parameter removed. An AccessException is thrown when
authorization fails.
- Overrides:
execute in class XmlRpcWorker
- Parameters:
is - the input stream having the HTTP requestcontext - the context