Errai 3.0.1-SNAPSHOT

org.jboss.errai.bus.server.service
Class ErraiServiceImpl<S>

java.lang.Object
  extended by org.jboss.errai.bus.server.service.ErraiServiceImpl<S>
All Implemented Interfaces:
ErraiService<S>, ServiceComposite<S>

public class ErraiServiceImpl<S>
extends Object
implements ErraiService<S>

Default implementation of the ErraiBus server-side service.


Field Summary
 
Fields inherited from interface org.jboss.errai.bus.server.service.ErraiService
AUTHORIZATION_SERVICE, AUTHORIZATION_SVC_SUBJECT, ERRAI_DEFAULT_JNDI, SERVER_ECHO_SERVICE, SESSION_AUTH_DATA
 
Constructor Summary
ErraiServiceImpl(ErraiServiceConfigurator configurator)
          Initializes the errai service with a bus and configurator
 
Method Summary
 void addShutdownHook(Runnable runnable)
           
 ServerMessageBus getBus()
          Gets the bus associated with this service
 ErraiServiceConfigurator getConfiguration()
          Gets the configuration used to initalize the service
 RequestDispatcher getDispatcher()
           
 SessionProvider<S> getSessionProvider()
           
 void setDispatcher(RequestDispatcher dispatcher)
           
 void setSessionProvider(SessionProvider<S> sessionProvider)
           
 void stopService()
          Shut down the entire Errai service.
 void store(Collection<Message> messages)
          Stores a collection of messages/
 void store(Message message)
          Passes off the message to the bus for handling
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErraiServiceImpl

@Inject
public ErraiServiceImpl(ErraiServiceConfigurator configurator)
Initializes the errai service with a bus and configurator

Parameters:
configurator - - the configurator to take care of the configuration for the service
Method Detail

store

public void store(Message message)
Passes off the message to the bus for handling

Specified by:
store in interface ErraiService<S>
Parameters:
message - - the message to store/deliver

store

public void store(Collection<Message> messages)
Description copied from interface: ErraiService
Stores a collection of messages/

Specified by:
store in interface ErraiService<S>

stopService

public void stopService()
Description copied from interface: ErraiService
Shut down the entire Errai service.

Specified by:
stopService in interface ErraiService<S>

getBus

public ServerMessageBus getBus()
Gets the bus associated with this service

Specified by:
getBus in interface ErraiService<S>
Returns:
the bus associated with this service

getConfiguration

public ErraiServiceConfigurator getConfiguration()
Gets the configuration used to initalize the service

Specified by:
getConfiguration in interface ErraiService<S>
Returns:
the errai service configurator

addShutdownHook

public void addShutdownHook(Runnable runnable)
Specified by:
addShutdownHook in interface ErraiService<S>

getSessionProvider

public SessionProvider<S> getSessionProvider()
Specified by:
getSessionProvider in interface ServiceComposite<S>

setSessionProvider

public void setSessionProvider(SessionProvider<S> sessionProvider)
Specified by:
setSessionProvider in interface ServiceComposite<S>

getDispatcher

public RequestDispatcher getDispatcher()
Specified by:
getDispatcher in interface ServiceComposite<S>

setDispatcher

public void setDispatcher(RequestDispatcher dispatcher)
Specified by:
setDispatcher in interface ServiceComposite<S>

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.