org.jboss.errai.workspaces.client.modules.shoutbox
Class Shoutbox

java.lang.Object
  extended by org.jboss.errai.workspaces.client.modules.shoutbox.Shoutbox

public class Shoutbox
extends Object

Interface to to the shoutbox service.
Usage is different for providers offering and clients demanding a subject through the shoutbox service.

Provider's do submit or retract offers:

  Shoutbox shoutbox = new Shoutbox(); // stateful
  shoutbox.submitOffer(PID, "demo.mailSender");
 

// provider becomes unavailable shoutbox.retractOffer(PID, "demo.mailSender");

Clients on the other hand do engage or retire offers:

  shoutbox.engageOffer(CID, "demo.mailSender",
       new ShoutboxCallback()
       {
         public void offerSubmitted(String providerId)
         {
           // provider becomes available
         }
 

public void offerRetracted(String providerId) { // provider retracted offer // may be temporary } } );

// client doesn't need the provider anymore shoutbox.retireOffer(CID, "demo.mailSender");

Author:
Heiko Braun
See Also:
ShoutboxModule

Constructor Summary
Shoutbox()
           
 
Method Summary
 void engageOffer(String client, String subject, ShoutboxCallback callback)
           
 void retireOffer(String client, String subjectMatter)
           
 void retractOffer(String provider, String subjectMatter)
           
 void submitOffer(String provider, String subjectMatter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Shoutbox

public Shoutbox()
Method Detail

submitOffer

public void submitOffer(String provider,
                        String subjectMatter)

retractOffer

public void retractOffer(String provider,
                         String subjectMatter)

engageOffer

public void engageOffer(String client,
                        String subject,
                        ShoutboxCallback callback)

retireOffer

public void retireOffer(String client,
                        String subjectMatter)


Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.