de.novanic.eventservice.service
Class RemoteEventServiceServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
              extended by com.google.gwt.user.server.rpc.RemoteServiceServlet
                  extended by de.novanic.eventservice.service.RemoteEventServiceServlet
All Implemented Interfaces:
com.google.gwt.user.server.rpc.SerializationPolicyProvider, EventExecutorService, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public abstract class RemoteEventServiceServlet
extends com.google.gwt.user.server.rpc.RemoteServiceServlet
implements EventExecutorService

RemoteEventServiceServlet is an implementation of EventExecutorService as a servlet and can be used to add events via the server side.

Author:
sstrohschein
Date: 20.09.2008
Time: 15:31:18
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
perThreadRequest, perThreadResponse
 
Constructor Summary
RemoteEventServiceServlet()
           
 
Method Summary
 void addEvent(Domain aDomain, Event anEvent)
          Adds an event for all users
 void addEventUserSpecific(Event anEvent)
          Adds an event for a specific user
 EventFilter getEventFilter(Domain aDomain)
          Returns the EventFilter for the user domain combination.
protected  javax.servlet.http.HttpServletRequest getRequest()
           
 boolean isUserRegistered()
          Checks if the user is registered for event listening.
 boolean isUserRegistered(Domain aDomain)
          Checks if the user is registered for event listening.
 void removeEventFilter(Domain aDomain)
          Removes the EventFilter of the domain.
 void setEventFilter(Domain aDomain, EventFilter anEventFilter)
          Changes the EventFilter for the user-domain combination.
 
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
doGetSerializationPolicy, getSerializationPolicy, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processPost, shouldCompressResponse
 
Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
doPost, doUnexpectedFailure, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContent
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteEventServiceServlet

public RemoteEventServiceServlet()
Method Detail

isUserRegistered

public boolean isUserRegistered()
Checks if the user is registered for event listening.

Specified by:
isUserRegistered in interface EventExecutorService
Returns:
true when the user is listening, otherwise false

isUserRegistered

public boolean isUserRegistered(Domain aDomain)
Checks if the user is registered for event listening.

Specified by:
isUserRegistered in interface EventExecutorService
Parameters:
aDomain - domain to check the registration for the user
Returns:
true when the user is listening, otherwise false

addEvent

public void addEvent(Domain aDomain,
                     Event anEvent)
Adds an event for all users

Specified by:
addEvent in interface EventExecutorService
Parameters:
aDomain - the domain to add the event
anEvent - event to add

addEventUserSpecific

public void addEventUserSpecific(Event anEvent)
Adds an event for a specific user

Specified by:
addEventUserSpecific in interface EventExecutorService
Parameters:
anEvent - event to add

setEventFilter

public void setEventFilter(Domain aDomain,
                           EventFilter anEventFilter)
Changes the EventFilter for the user-domain combination. The EventFilter can be removed with the method EventExecutorService.removeEventFilter(de.novanic.eventservice.client.event.domain.Domain) or when that method is called with NULL as the EventFilter parameter value.

Specified by:
setEventFilter in interface EventExecutorService
Parameters:
aDomain - domain to set the EventFilter
anEventFilter - new EventFilter

getEventFilter

public EventFilter getEventFilter(Domain aDomain)
Returns the EventFilter for the user domain combination.

Specified by:
getEventFilter in interface EventExecutorService
Parameters:
aDomain - domain
Returns:
EventFilter for the domain

removeEventFilter

public void removeEventFilter(Domain aDomain)
Removes the EventFilter of the domain.

Specified by:
removeEventFilter in interface EventExecutorService
Parameters:
aDomain - domain to drop the EventFilter from

getRequest

protected javax.servlet.http.HttpServletRequest getRequest()