org.granite.gravity
Interface Gravity

All Superinterfaces:
ShutdownListener
All Known Subinterfaces:
Gravity
All Known Implementing Classes:
DefaultGravity, GAEGravity, GravityBean, GravityProxy

public interface Gravity
extends ShutdownListener

Author:
Franck WOLFF

Field Summary
static String BYTEARRAY_BODY_HEADER
           
static String ENCODE_MESSAGE_BODY_KEY
           
static String RECONNECT_INTERVAL_MS_KEY
           
static String RECONNECT_MAX_ATTEMPTS_KEY
           
 
Method Summary
 boolean access(String clientId)
           
 boolean cancel(AsyncChannelRunner runnable)
           
 void execute(AsyncChannelRunner runnable)
           
<C extends Channel>
C
getChannel(ChannelFactory<C> channelFactory, String clientId)
           
 GraniteConfig getGraniteConfig()
           
 GravityConfig getGravityConfig()
           
 ServiceAdapter getServiceAdapter(String messageType, String destinationId)
           
 ServicesConfig getServicesConfig()
           
 SharedContext getSharedContext()
           
 UdpReceiverFactory getUdpReceiverFactory()
           
 Message handleMessage(ChannelFactory<? extends Channel> channelFactory, Message message)
           
 Message handleMessage(ChannelFactory<? extends Channel> channelFactory, Message message, boolean skipInterceptor)
           
 boolean hasUdpReceiverFactory()
           
 GraniteContext initThread(String sessionId, String clientType)
           
 boolean isStarted()
           
 Message publishMessage(AsyncMessage message)
           
 Message publishMessage(Channel fromChannel, AsyncMessage message)
           
 void reconfigure(GravityConfig gravityConfig, GraniteConfig graniteConfig)
           
 void releaseThread()
           
 Channel removeChannel(String clientId, boolean timeout)
           
 void start()
           
 void stop()
           
 void stop(boolean now)
           
 

Field Detail

RECONNECT_INTERVAL_MS_KEY

static final String RECONNECT_INTERVAL_MS_KEY
See Also:
Constant Field Values

RECONNECT_MAX_ATTEMPTS_KEY

static final String RECONNECT_MAX_ATTEMPTS_KEY
See Also:
Constant Field Values

ENCODE_MESSAGE_BODY_KEY

static final String ENCODE_MESSAGE_BODY_KEY
See Also:
Constant Field Values

BYTEARRAY_BODY_HEADER

static final String BYTEARRAY_BODY_HEADER
See Also:
Constant Field Values
Method Detail

getGravityConfig

GravityConfig getGravityConfig()

getServicesConfig

ServicesConfig getServicesConfig()

getGraniteConfig

GraniteConfig getGraniteConfig()

getSharedContext

SharedContext getSharedContext()

hasUdpReceiverFactory

boolean hasUdpReceiverFactory()

getUdpReceiverFactory

UdpReceiverFactory getUdpReceiverFactory()

isStarted

boolean isStarted()

initThread

GraniteContext initThread(String sessionId,
                          String clientType)

releaseThread

void releaseThread()

getServiceAdapter

ServiceAdapter getServiceAdapter(String messageType,
                                 String destinationId)

start

void start()
           throws Exception
Throws:
Exception

reconfigure

void reconfigure(GravityConfig gravityConfig,
                 GraniteConfig graniteConfig)

stop

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

stop

void stop(boolean now)
          throws Exception
Throws:
Exception

getChannel

<C extends Channel> C getChannel(ChannelFactory<C> channelFactory,
                                 String clientId)

removeChannel

Channel removeChannel(String clientId,
                      boolean timeout)

access

boolean access(String clientId)

execute

void execute(AsyncChannelRunner runnable)

cancel

boolean cancel(AsyncChannelRunner runnable)

handleMessage

Message handleMessage(ChannelFactory<? extends Channel> channelFactory,
                      Message message)

handleMessage

Message handleMessage(ChannelFactory<? extends Channel> channelFactory,
                      Message message,
                      boolean skipInterceptor)

publishMessage

Message publishMessage(AsyncMessage message)

publishMessage

Message publishMessage(Channel fromChannel,
                       AsyncMessage message)