org.jbpm.task.service.responsehandlers
Class AbstractBaseResponseHandler
java.lang.Object
org.jbpm.task.service.responsehandlers.AbstractBaseResponseHandler
- All Implemented Interfaces:
- org.kie.task.service.ResponseHandler
- Direct Known Subclasses:
- AbstractBlockingResponseHandler
public abstract class AbstractBaseResponseHandler
- extends Object
- implements org.kie.task.service.ResponseHandler
Abstract base class for client ResponseHandlers. Provides synchonized access to done which represents
if the response is completed. Also has an error which will be set when there is a problem with
a response. Users of this class should check to see if the response completed successfully, via
the isDone and the hasError.
Please note that the error is actually the Exception that occured on the server while
processing the request.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractBaseResponseHandler
public AbstractBaseResponseHandler()
hasError
public boolean hasError()
getError
public RuntimeException getError()
setError
public void setError(RuntimeException error)
- Specified by:
setError
in interface org.kie.task.service.ResponseHandler
isDone
public boolean isDone()
setDone
protected void setDone(boolean done)
createSideException
protected static RuntimeException createSideException(RuntimeException serverSideException)
- This method will take the specified serverSideException, and create a new one for the client based
on the serverSideException. This is done so a proper stack trace can be made for the client, as opposed
to seeing the server side stack.
- Parameters:
serverSideException
- exception used to create client side exception
- Returns:
- client side exception
Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.