[jboss-jira] [JBoss JIRA] Closed: (JBREM-363) make callbacks easier with richer API for registering for callbacks

David Lloyd (JIRA) jira-events at lists.jboss.org
Wed Sep 26 05:31:20 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBREM-363?page=all ]

David Lloyd closed JBREM-363.
-----------------------------


> make callbacks easier with richer API for registering for callbacks
> -------------------------------------------------------------------
>
>                 Key: JBREM-363
>                 URL: http://jira.jboss.com/jira/browse/JBREM-363
>             Project: JBoss Remoting
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: callbacks
>    Affects Versions: 1.4.0 final
>            Reporter: Tom  Elrod
>         Assigned To: Tom  Elrod
>            Priority: Blocker
>             Fix For: 2.0.0.Beta2 (Boon)
>
>
> A long, long time ago remoting had visibility to if a remoting transport was uni directional or bi directional.  This was done so that if added a callback listener and the transport was uni directional (like http), remoting would be "smart" enough to simulate pull callbacks by internally polling for callbacks from the server and then calling on the callback listener interface with the callbacks (so to the user appeared to be an asynchronous push callback).
> This approach was ditched so that the user specifically choose to do either pull or push callbacks (indicated by if a callback server locator was provided).  This was done since no way to guess at user's environment.  If they didn't have a firewall and wanted to have a callback server running in their client vm to receive true push callbacks, then could do this.  Otherwise, could do pull callbacks where they manually polled for callbacks from the server via getCallbacks() method of the Client.
> A better, and more user friendly approach, would be to allow all three approaches and hide some of the complexity of creating their own callback server themselves.  So propose to change the Client API to have the following callback related methods:
>    /**
>     * Adds the specified handler as a callback listener for push (async) callbacks.
>     * If the transport is uni-directional (e.g. http), remoting will automatically
>     * poll for callbacks from the server and deliver them to the callback handler.
>     * If the transport is bi-directional (e.g. multiplex), remoting will automatically
>     * create a callback server internally and receive and deliver the callbacks as 
>     * they are generated on the server.
>     * The metadata map passed will control configuration for how the callbacks are processed,
>     * such as the polling frequency.
>     * @param callbackhandler
>     * @param metadata
>     */
>    public void addListener(InvokerCallbackHandler callbackhandler, Map metadata)
>    /**
>     * Adds the specified handler as the callback listener for push (async) callbacks.
>     * If the locator passed is not null, will use this pre-configured and running callback
>     * server locator.  If the locator is null, will automatically create a callback server
>     * internally using configuration provided by metadata map (otherwise will use defaults)
>     * @param callbackhandler
>     * @param locator
>     */
>    public void addListener(InvokerCallbackHandler callbackhandler, InvokerLocator locator, Map metadata)
>    /**
>     * Adds the specified handler as a callback listener for pull (sync) callbacks.
>     * The invoker server will then collect the callbacks for this specific handler.
>     * The callbacks can be retrieved by calling the getCallbacks() method.
>     * Note: this will cause the client invoker's client locator to be set to null.
>     *
>     * @param callbackHandler
>     * @throws Throwable
>     */
>    public void addListener(InvokerCallbackHandler callbackHandler) throws Throwable

-- 
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