org.drools.guvnor.server
Class Backchannel

java.lang.Object
  extended by org.drools.guvnor.server.Backchannel

public class Backchannel
extends Object

This is the backchannel to send "push" messages to the browser. Here be dragons. Would like to convert this to using actors one day. TODO: convert to executor architecture. Only one instance needed.


Method Summary
 List<PushResponse> await(String userName)
           
static Backchannel getInstance()
           
 void publish(PushResponse message)
          Push out a message to all currently connected clients
 void push(String userName, PushResponse message)
          Push out a message to the specific client
 List<PushResponse> subscribe()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static Backchannel getInstance()

subscribe

public List<PushResponse> subscribe()

await

public List<PushResponse> await(String userName)
                         throws InterruptedException
Throws:
InterruptedException

push

public void push(String userName,
                 PushResponse message)
Push out a message to the specific client


publish

public void publish(PushResponse message)
Push out a message to all currently connected clients



Copyright © 2001-2011 JBoss Inc.. All Rights Reserved.