|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.symcomp.scscp.ProcedureCallHandler
public abstract class ProcedureCallHandler
The class used to implement the handlers inside an SCSCP server.
To create your own handler this class needs to be subclassed and the methods
handlePayload,
getDescription,
getServiceNameStr,
handle
(instead of handlePayload), and/or getServiceNames or
getServiceName (instead of getServiceNameStr)
| Constructor Summary | |
|---|---|
ProcedureCallHandler()
|
|
| Method Summary | |
|---|---|
abstract java.lang.String |
getDescription(org.symcomp.openmath.OMSymbol smb)
A concise description of this handler. |
org.symcomp.openmath.OMSymbol |
getServiceName()
In ProcedureCallHandler, this method simply returns
an OMSymbol whose CD is scscp_transient_1, and whose name is
getServiceNameStr(). |
org.symcomp.openmath.OMSymbol[] |
getServiceNames()
Method used by the server to check whether a handler supports a particular service. |
java.lang.String |
getServiceNameStr()
In ProcedureCallHandler, this method returns null. |
ProcedureDone |
handle(ProcedureCall pc)
The method called by the server. |
OpenMathBase |
handlePayload(OpenMathBase payload)
The method that subclasses should override and do something sensible in. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProcedureCallHandler()
| Method Detail |
|---|
public OpenMathBase handlePayload(OpenMathBase payload)
throws OpenMathException
payload - the input
OpenMathException
public ProcedureDone handle(ProcedureCall pc)
throws OpenMathException
ProcedureCallHandler
it simply calls handlePayload and wraps its response in
a ProcedureCompleted object.
pc - the Procedure Call containing the query
OpenMathExceptionpublic abstract java.lang.String getDescription(org.symcomp.openmath.OMSymbol smb)
smb - Since ProcedureCallHandlers may handle more than one
service (by implementing handle), different descriptions
may be required for different services. Hence this parameter.
public org.symcomp.openmath.OMSymbol[] getServiceNames()
ProcedureCallHandler, this method simply returns
an array with one element: the result of getServiceName().
public org.symcomp.openmath.OMSymbol getServiceName()
ProcedureCallHandler, this method simply returns
an OMSymbol whose CD is scscp_transient_1, and whose name is
getServiceNameStr().
public java.lang.String getServiceNameStr()
ProcedureCallHandler, this method returns null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||