[jboss-jira] [JBoss JIRA] Closed: (JBREM-605) Inform a server side listener that a callback has been delivered.
Ron Sigal (JIRA)
jira-events at jboss.com
Mon Nov 6 02:27:41 EST 2006
[ http://jira.jboss.com/jira/browse/JBREM-605?page=all ]
Ron Sigal closed JBREM-605.
---------------------------
Resolution: Done
The new callback acknowledgement facility introduces a CallbackListener interface, which allows the server side of an application to register with the Remoting system to be informed of the delivery of a Callback.
There are two forms of acknowledgement:
1) preprocess acknowledgement, and
2) postprocess acknowledgement.
In the first variant, an acknowledgement indicates that the process of delivering the acknowledged callback has begun, though it doesn't guarantee that the callback has been received and processed. The second variant indicates that the acknowledged callback has arrived at the client and has been delivered to the client side InvokerCallbackHandler.
In the case of push callbacks, both prepreprocess and postprocess acknowledgements are made after the return of a synchronous invocation (on the server side) which has delivered the acknowledged callback to the InvokerCallbackHandler on the client side, i.e., the two forms of acknowledgement are identical for push callbacks.
In the case of pull callbacks, preprocess acknowledgements are made when the server has responded to a request for currently stored callbacks. Postprocess acknowledgements of pull callbacks are the responsibility of the application, and the new method Client.acknowledgeCallbacks() is provided for that purpose.
Polled callbacks are handled internally as pull callbacks, and preprocess acknowledgements, as in the case of pull callbacks, are made when the server has responded to a request for currently stored callbacks. However, polled callbacks are functionally equivalent to push callbacks from the perspective of the application, so the Remoting system handles postprocess acknowledgements for polled callbacks, as it does for push callbacks. Postprocess acknowledgements for polled callbacks are made after a synchronous invocation (on the client side) has delivered the acknowledged callback to the client side InvokerCallbackHandler.
The application requests the acknowledgement of a callback by adding two elements to the callback's return payload HashMap. One has the key ServerInvokerCallbackHandler.CALLBACK_ID, which passes a unique identifier for the callback. The other has the key ServerInvokerCallbackHandler.CALLBACK_PREPROCESS_LISTENER or ServerInvokerCallbackHandler.CALLBACK_POSTPROCESS_LISTENER, and its value must implemnt the interface org.jboss.remoting.callback.CallbackListener.
Sample code package: org.jboss.remoting.samples.callback.acknowldegement.
> Inform a server side listener that a callback has been delivered.
> -----------------------------------------------------------------
>
> Key: JBREM-605
> URL: http://jira.jboss.com/jira/browse/JBREM-605
> Project: JBoss Remoting
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Affects Versions: 2.2.0.Alpha3 (Bluto)
> Reporter: Ron Sigal
> Assigned To: Ron Sigal
> Fix For: 2.2.0.Alpha3 (Bluto)
>
>
> JBossMessaging has a need to know that a Callback has been pulled to the client side and has been processed.
> See JBMESSAGING-207 for some discussion.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list