org.granite.gravity
Class GravityProxy

java.lang.Object
  extended by org.granite.gravity.GravityProxy
All Implemented Interfaces:
ShutdownListener, Gravity

public class GravityProxy
extends Object
implements Gravity

Author:
William DRAI

Field Summary
 
Fields inherited from interface org.granite.gravity.Gravity
BYTEARRAY_BODY_HEADER, RECONNECT_INTERVAL_MS_KEY, RECONNECT_MAX_ATTEMPTS_KEY
 
Constructor Summary
GravityProxy(ServletContext servletContext)
           
 
Method Summary
 boolean access(String channelId)
           
 boolean cancel(AsyncChannelRunner runnable)
           
 void execute(AsyncChannelRunner runnable)
           
 Channel getChannel(String channelId)
           
 GraniteConfig getGraniteConfig()
           
 GravityConfig getGravityConfig()
           
 ServiceAdapter getServiceAdapter(String messageType, String destinationId)
           
 ServicesConfig getServicesConfig()
           
 Message handleMessage(Message message)
           
 Message handleMessage(Message message, boolean skipInterceptor)
           
 GraniteContext initThread()
           
 boolean isStarted()
           
 Message publishMessage(AsyncMessage message)
           
 Message publishMessage(Channel fromChannel, AsyncMessage message)
           
 void reconfigure(GravityConfig gravityConfig, GraniteConfig graniteConfig)
           
 void releaseThread()
           
 Channel removeChannel(String channelId)
           
 void start()
           
 void stop()
           
 void stop(boolean now)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GravityProxy

public GravityProxy(ServletContext servletContext)
Method Detail

getGravityConfig

public GravityConfig getGravityConfig()
Specified by:
getGravityConfig in interface Gravity

getServicesConfig

public ServicesConfig getServicesConfig()
Specified by:
getServicesConfig in interface Gravity

getGraniteConfig

public GraniteConfig getGraniteConfig()
Specified by:
getGraniteConfig in interface Gravity

isStarted

public boolean isStarted()
Specified by:
isStarted in interface Gravity

initThread

public GraniteContext initThread()
Specified by:
initThread in interface Gravity

releaseThread

public void releaseThread()
Specified by:
releaseThread in interface Gravity

getServiceAdapter

public ServiceAdapter getServiceAdapter(String messageType,
                                        String destinationId)
Specified by:
getServiceAdapter in interface Gravity

start

public void start()
           throws Exception
Specified by:
start in interface Gravity
Throws:
Exception

reconfigure

public void reconfigure(GravityConfig gravityConfig,
                        GraniteConfig graniteConfig)
Specified by:
reconfigure in interface Gravity

stop

public void stop()
          throws Exception
Specified by:
stop in interface ShutdownListener
Specified by:
stop in interface Gravity
Throws:
Exception

stop

public void stop(boolean now)
          throws Exception
Specified by:
stop in interface Gravity
Throws:
Exception

getChannel

public Channel getChannel(String channelId)
Specified by:
getChannel in interface Gravity

removeChannel

public Channel removeChannel(String channelId)
Specified by:
removeChannel in interface Gravity

access

public boolean access(String channelId)
Specified by:
access in interface Gravity

execute

public void execute(AsyncChannelRunner runnable)
Specified by:
execute in interface Gravity

cancel

public boolean cancel(AsyncChannelRunner runnable)
Specified by:
cancel in interface Gravity

handleMessage

public Message handleMessage(Message message)
Specified by:
handleMessage in interface Gravity

handleMessage

public Message handleMessage(Message message,
                             boolean skipInterceptor)
Specified by:
handleMessage in interface Gravity

publishMessage

public Message publishMessage(AsyncMessage message)
Specified by:
publishMessage in interface Gravity

publishMessage

public Message publishMessage(Channel fromChannel,
                              AsyncMessage message)
Specified by:
publishMessage in interface Gravity