org.atmosphere.gwt.client.extra
Class WindowSocket

java.lang.Object
  extended by org.atmosphere.gwt.client.extra.WindowSocket

public class WindowSocket
extends Object

Author:
p.havelaar

Nested Class Summary
static class WindowSocket.MessageEvent
           
static interface WindowSocket.MessageHandler
           
 
Constructor Summary
WindowSocket()
           
 
Method Summary
 com.google.gwt.event.shared.HandlerRegistration addHandler(WindowSocket.MessageHandler handler)
           
 void bind(String name)
           
static void crossPost(Window source, Window target, String socketName, String message)
           
static boolean exists(Window w, String socketName)
           
static void forcePost(Window w, String socketName, String message)
          This will create a socket in the target window to receive the message even if the target window did not bind a WindowSocket yet.
static void post(Window w, String socketName, String message)
           
 void unbind()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WindowSocket

public WindowSocket()
Method Detail

exists

public static boolean exists(Window w,
                             String socketName)

post

public static void post(Window w,
                        String socketName,
                        String message)

crossPost

public static void crossPost(Window source,
                             Window target,
                             String socketName,
                             String message)

forcePost

public static void forcePost(Window w,
                             String socketName,
                             String message)
This will create a socket in the target window to receive the message even if the target window did not bind a WindowSocket yet. This will create a queue that can be picket up when the target window will bind.

Parameters:
w -
socketName -
message -

bind

public void bind(String name)

unbind

public void unbind()

addHandler

public com.google.gwt.event.shared.HandlerRegistration addHandler(WindowSocket.MessageHandler handler)


Copyright © 2012. All Rights Reserved.