com.mycompany.myproject.api
Class MyFunction
java.lang.Object
org.xins.common.manageable.Manageable
org.xins.server.Function
com.mycompany.myproject.api.MyFunction
- Direct Known Subclasses:
- MyFunctionImpl
- public abstract class MyFunction
- extends Function
Abstract base class for MyFunction
function implementation.
Constructor Summary |
protected |
MyFunction(APIImpl api)
Constructs a new MyFunction instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MyFunction
protected MyFunction(APIImpl api)
- Constructs a new
MyFunction
instance.
- Parameters:
api
- the API to which this function belongs, guaranteed to be not
null
.
handleCall
protected final FunctionResult handleCall(CallContext _context)
throws Throwable
- Throws:
Throwable
call
public abstract MyFunction.Result call(MyFunction.Request request)
throws Throwable
- Calls this function. If the function fails, it may throw any kind of
exception. All exceptions will be handled by the caller.
- Parameters:
request
- the request, never null
.
- Returns:
- the result of the function call, should never be
null
.
- Throws:
Throwable
- if anything went wrong.