org.atmosphere.plugin.hazelcast
Class HazelcastBroadcaster

java.lang.Object
  extended by org.atmosphere.cpr.DefaultBroadcaster
      extended by org.atmosphere.util.AbstractBroadcasterProxy
          extended by org.atmosphere.plugin.hazelcast.HazelcastBroadcaster
All Implemented Interfaces:
org.atmosphere.cpr.Broadcaster
Direct Known Subclasses:
HazelcastSerializedBroadcaster

public class HazelcastBroadcaster
extends org.atmosphere.util.AbstractBroadcasterProxy

Simple Broadcaster implementation based on Hazelcast

Author:
Jeanfrancois Arcand

Nested Class Summary
 
Nested classes/interfaces inherited from class org.atmosphere.cpr.DefaultBroadcaster
org.atmosphere.cpr.DefaultBroadcaster.AsyncWriteToken, org.atmosphere.cpr.DefaultBroadcaster.WriteQueue
 
Nested classes/interfaces inherited from interface org.atmosphere.cpr.Broadcaster
org.atmosphere.cpr.Broadcaster.POLICY, org.atmosphere.cpr.Broadcaster.SCOPE
 
Field Summary
 
Fields inherited from class org.atmosphere.cpr.DefaultBroadcaster
ASYNC_TOKEN, asyncWriteFuture, bc, broadcasterListeners, broadcastOnResume, CACHED, candidateForPoolable, config, delayedBroadcast, destroyed, dispatchThread, initialized, lifeCycleListeners, messages, name, notifierFuture, POLLING_DEFAULT, resources, scope, sharedListeners, started, uniqueWriteQueue, uri, waitTime, writeQueues, writeTimeoutInSecond
 
Fields inherited from interface org.atmosphere.cpr.Broadcaster
ROOT_MASTER
 
Constructor Summary
HazelcastBroadcaster()
           
 
Method Summary
 org.atmosphere.cpr.Broadcaster addAtmosphereResource(org.atmosphere.cpr.AtmosphereResource resource)
           
 void destroy()
          
protected  com.hazelcast.core.ITopic getTopic()
          Get the Hazelcast topic
 void incomingBroadcast()
          
 org.atmosphere.cpr.Broadcaster initialize(String id, org.atmosphere.cpr.AtmosphereConfig config)
           
 org.atmosphere.cpr.Broadcaster initialize(String id, URI uri, org.atmosphere.cpr.AtmosphereConfig config)
           
 void outgoingBroadcast(Object message)
          
 org.atmosphere.cpr.Broadcaster removeAtmosphereResource(org.atmosphere.cpr.AtmosphereResource resource)
           
 void setID(String id)
           
 void setUp()
           
 
Methods inherited from class org.atmosphere.util.AbstractBroadcasterProxy
b, broadcast, broadcast, broadcast, broadcastReceivedMessage, getBroadcastHandler, invokeOnStateChange, reconfigure
 
Methods inherited from class org.atmosphere.cpr.DefaultBroadcaster
addBroadcasterLifeCyclePolicyListener, addBroadcasterListener, awaitAndBroadcast, broadcasterListeners, broadcastOnResume, broadcastOnResume, cacheAndSuspend, cacheLostMessage, cacheLostMessage, cacheLostMessage, cacheLostMessage, cacheMessageOnIOException, checkCachedAndPush, createBroadcasterConfig, currentLifecycleTask, currentLifecycleTask, delayBroadcast, delayBroadcast, deliverPush, dispatchMessages, endBroadcast, entryDone, executeAsyncWrite, executeBlockingWrite, filter, futureDone, getAsyncWriteHandler, getAtmosphereResources, getBroadcasterConfig, getBroadcasterLifeCyclePolicy, getID, getScope, isDestroyed, killReactiveThreads, lifecycleHandler, lifecycleHandler, lifeCycleListeners, lifeCyclePolicy, messages, notifyAndAdd, notifyBroadcastListener, notifyOnAddAtmosphereResourceListener, notifyOnMessage, notifyOnRemoveAtmosphereResourceListener, onException, onException, outOfOrderBroadcastSupported, perRequestFilter, policy, prepareInvokeOnStateChange, push, queueWriteIO, reactiveThreadsCount, recentActivity, releaseExternalResources, removeAtmosphereResource, removeBroadcasterLifeCyclePolicyListener, removeBroadcasterListener, rename, resumeAll, retrieveTrackedBroadcast, scheduleFixedBroadcast, scheduleFixedBroadcast, setBroadcasterConfig, setBroadcasterLifeCyclePolicy, setScope, setSuspendPolicy, spawnReactor, start, toString, writeQueues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HazelcastBroadcaster

public HazelcastBroadcaster()
Method Detail

initialize

public org.atmosphere.cpr.Broadcaster initialize(String id,
                                                 org.atmosphere.cpr.AtmosphereConfig config)
Overrides:
initialize in class org.atmosphere.cpr.DefaultBroadcaster

initialize

public org.atmosphere.cpr.Broadcaster initialize(String id,
                                                 URI uri,
                                                 org.atmosphere.cpr.AtmosphereConfig config)
Specified by:
initialize in interface org.atmosphere.cpr.Broadcaster
Overrides:
initialize in class org.atmosphere.util.AbstractBroadcasterProxy

setUp

public void setUp()

addAtmosphereResource

public org.atmosphere.cpr.Broadcaster addAtmosphereResource(org.atmosphere.cpr.AtmosphereResource resource)
Specified by:
addAtmosphereResource in interface org.atmosphere.cpr.Broadcaster
Overrides:
addAtmosphereResource in class org.atmosphere.cpr.DefaultBroadcaster

removeAtmosphereResource

public org.atmosphere.cpr.Broadcaster removeAtmosphereResource(org.atmosphere.cpr.AtmosphereResource resource)
Specified by:
removeAtmosphereResource in interface org.atmosphere.cpr.Broadcaster
Overrides:
removeAtmosphereResource in class org.atmosphere.cpr.DefaultBroadcaster

setID

public void setID(String id)
Specified by:
setID in interface org.atmosphere.cpr.Broadcaster
Overrides:
setID in class org.atmosphere.cpr.DefaultBroadcaster

destroy

public void destroy()

Specified by:
destroy in interface org.atmosphere.cpr.Broadcaster
Overrides:
destroy in class org.atmosphere.cpr.DefaultBroadcaster

incomingBroadcast

public void incomingBroadcast()

Specified by:
incomingBroadcast in class org.atmosphere.util.AbstractBroadcasterProxy

outgoingBroadcast

public void outgoingBroadcast(Object message)

Specified by:
outgoingBroadcast in class org.atmosphere.util.AbstractBroadcasterProxy

getTopic

protected com.hazelcast.core.ITopic getTopic()
Get the Hazelcast topic

Returns:
topic


Copyright © 2015. All Rights Reserved.