org.activemath.webapp.ws
Class XmlrpcManager

java.lang.Object
  extended by org.activemath.webapp.ws.XmlrpcManager
All Implemented Interfaces:
AppSessionShutdownHook

public class XmlrpcManager
extends Object
implements AppSessionShutdownHook

The singleton maps XMLRPC path to handlers.


Field Summary
protected static Logger log
           
 
Method Summary
 URL addServerWithPrefix(String prefix, Object handler)
          Use the variant with AppSession, if you can.
 URL addServerWithPrefix(String prefix, Object handler, AppSession session)
          Computes a random URL not yet used and attaches the handler at this path, starting with /prefix.
 void clearServicesForSession(AppSession session)
           
static XmlrpcManager getInstance()
           
protected  org.activemath.webapp.ws.XmlrpcHandler getServerForPath(String path)
           
 String getXmlrpcPath()
           
 void removeServer(Object handler)
           
 void removeServerFoPath(String path)
           
 void sessionShutdown(AppSession session)
          This is called on AppSession shutdown.
 void setXmlrpcPath(String xmlrpcPath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static Logger log
Method Detail

getInstance

public static XmlrpcManager getInstance()

addServerWithPrefix

public URL addServerWithPrefix(String prefix,
                               Object handler)
Use the variant with AppSession, if you can.


addServerWithPrefix

public URL addServerWithPrefix(String prefix,
                               Object handler,
                               AppSession session)
Computes a random URL not yet used and attaches the handler at this path, starting with /prefix. This method is called for JNLP files through Velocity, so it needs to stay public.

Parameters:
prefix -
handler -
Returns:
a full URL to talk to this service.

sessionShutdown

public void sessionShutdown(AppSession session)
This is called on AppSession shutdown.

Specified by:
sessionShutdown in interface AppSessionShutdownHook

removeServerFoPath

public void removeServerFoPath(String path)

removeServer

public void removeServer(Object handler)

clearServicesForSession

public void clearServicesForSession(AppSession session)

getServerForPath

protected org.activemath.webapp.ws.XmlrpcHandler getServerForPath(String path)

getXmlrpcPath

public String getXmlrpcPath()

setXmlrpcPath

public void setXmlrpcPath(String xmlrpcPath)