org.granite.gravity
Interface Gravity

All Superinterfaces:
ShutdownListener
All Known Implementing Classes:
DefaultGravity, GAEGravity, GravityProxy

public interface Gravity
extends ShutdownListener

Author:
Franck WOLFF

Field Summary
static String BYTEARRAY_BODY_HEADER
           
static String RECONNECT_INTERVAL_MS_KEY
           
static String RECONNECT_MAX_ATTEMPTS_KEY
           
 
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)
           
 

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

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()

isStarted

boolean isStarted()

initThread

GraniteContext initThread()

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

Channel getChannel(String channelId)

removeChannel

Channel removeChannel(String channelId)

access

boolean access(String channelId)

execute

void execute(AsyncChannelRunner runnable)

cancel

boolean cancel(AsyncChannelRunner runnable)

handleMessage

Message handleMessage(Message message)

handleMessage

Message handleMessage(Message message,
                      boolean skipInterceptor)

publishMessage

Message publishMessage(AsyncMessage message)

publishMessage

Message publishMessage(Channel fromChannel,
                       AsyncMessage message)