|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfo.sswap.api.servlet.AsyncRIGInvocation
class AsyncRIGInvocation
Provides an asynchronous invocation of a service with a RIG. The run() method of this class is executed in a separate thread, and it wraps the usual, synchronous execution of a method. Later, the result of the service's execution is stored in a cache, so that the caller may retrieve it.
Field Summary | |
---|---|
private RIG |
asyncRIG
The original asynchronous RIG submitted in this invocation |
private static org.apache.log4j.Logger |
LOGGER
|
private RDG |
rdg
The RIG of the service being invoked. |
private java.lang.String |
rrgToken
The token that will allow the caller to retrieve the resulting RRG. |
Constructor Summary | |
---|---|
AsyncRIGInvocation(RIG asyncRIG,
RDG rdg,
java.lang.String rrgToken)
Creates a new asynchronous invocation object that will wrap in a separate thread the regular, synchronous execution of the service. |
Method Summary | |
---|---|
private RIG |
createRIG(RRG upstreamRRG)
Creates a RIG from an upstream RRG. |
private RRG |
getUpstreamRRG(RIG asyncRIG)
Retrieves the upstream RRG given the information in the asynchronous RIG |
private void |
handleError(java.lang.String description,
java.lang.Throwable e)
|
private void |
handleError(java.lang.Throwable e)
|
private static void |
logDebug(SSWAPModel model)
|
private void |
removeToken(RRG rrg)
|
void |
run()
Main method of the asynchronous thread. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final org.apache.log4j.Logger LOGGER
private RIG asyncRIG
private RDG rdg
private java.lang.String rrgToken
Constructor Detail |
---|
public AsyncRIGInvocation(RIG asyncRIG, RDG rdg, java.lang.String rrgToken)
asyncRIG
- the asynchronous RIG submitted to invoke the servicerdg
- the RDG for the service being invokedrrgToken
- the token that will allow the caller to retrieve the resulting RRGMethod Detail |
---|
public void run()
run
in interface java.lang.Runnable
private void handleError(java.lang.Throwable e)
private void handleError(java.lang.String description, java.lang.Throwable e)
private RIG createRIG(RRG upstreamRRG)
upstreamRRG
- the upstream RRG
private void removeToken(RRG rrg)
private RRG getUpstreamRRG(RIG asyncRIG) throws java.lang.Exception
asyncRIG
- the asynchronous RIG
java.lang.Exception
- if there is an issue while retrieving the RIG.private static void logDebug(SSWAPModel model)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |