org.apache.hupa.server.handler
Class AbstractSessionHandler<A extends net.customware.gwt.dispatch.shared.Action<R>,R extends net.customware.gwt.dispatch.shared.Result>
java.lang.Object
org.apache.hupa.server.handler.AbstractSessionHandler<A,R>
- All Implemented Interfaces:
- net.customware.gwt.dispatch.server.ActionHandler<A,R>
- Direct Known Subclasses:
- AbstractDeleteMessageHandler, AbstractFetchMessagesHandler, AbstractSendMessageHandler, CreateFolderHandler, DeleteFolderHandler, FetchFoldersHandler, GetMessageDetailsHandler, GetRawMessageHandler, IdleHandler, LogoutUserHandler, MoveMessageHandler, PrepareNewMessageHandler, RenameFolderHandler, SetFlagsHandler, TagMessagesHandler
public abstract class AbstractSessionHandler<A extends net.customware.gwt.dispatch.shared.Action<R>,R extends net.customware.gwt.dispatch.shared.Result>
- extends Object
- implements net.customware.gwt.dispatch.server.ActionHandler<A,R>
Abstract class which take care of checking if the session is still valid before
executing the handler
Constructor Summary |
AbstractSessionHandler(IMAPStoreCache cache,
org.apache.commons.logging.Log logger,
com.google.inject.Provider<javax.servlet.http.HttpSession> httpSessionProvider)
|
Method Summary |
R |
execute(A action,
net.customware.gwt.dispatch.server.ExecutionContext context)
Execute executeInternal method |
protected abstract R |
executeInternal(A action,
net.customware.gwt.dispatch.server.ExecutionContext context)
|
protected User |
getUser()
Return the User stored in session with the given id |
void |
rollback(A action,
R result,
net.customware.gwt.dispatch.server.ExecutionContext context)
Not implemented. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.customware.gwt.dispatch.server.ActionHandler |
getActionType |
httpSessionProvider
protected final com.google.inject.Provider<javax.servlet.http.HttpSession> httpSessionProvider
cache
protected final IMAPStoreCache cache
logger
protected final org.apache.commons.logging.Log logger
AbstractSessionHandler
@Inject
public AbstractSessionHandler(IMAPStoreCache cache,
org.apache.commons.logging.Log logger,
com.google.inject.Provider<javax.servlet.http.HttpSession> httpSessionProvider)
execute
public R execute(A action,
net.customware.gwt.dispatch.server.ExecutionContext context)
throws net.customware.gwt.dispatch.shared.ActionException
- Execute executeInternal method
- Specified by:
execute
in interface net.customware.gwt.dispatch.server.ActionHandler<A extends net.customware.gwt.dispatch.shared.Action<R>,R extends net.customware.gwt.dispatch.shared.Result>
- Throws:
net.customware.gwt.dispatch.shared.ActionException
rollback
public void rollback(A action,
R result,
net.customware.gwt.dispatch.server.ExecutionContext context)
throws net.customware.gwt.dispatch.shared.ActionException
- Not implemented. Should get overridden if needed
- Specified by:
rollback
in interface net.customware.gwt.dispatch.server.ActionHandler<A extends net.customware.gwt.dispatch.shared.Action<R>,R extends net.customware.gwt.dispatch.shared.Result>
- Throws:
net.customware.gwt.dispatch.shared.ActionException
executeInternal
protected abstract R executeInternal(A action,
net.customware.gwt.dispatch.server.ExecutionContext context)
throws net.customware.gwt.dispatch.shared.ActionException
- Throws:
net.customware.gwt.dispatch.shared.ActionException
getUser
protected User getUser()
throws net.customware.gwt.dispatch.shared.ActionException
- Return the User stored in session with the given id
- Returns:
- user
- Throws:
net.customware.gwt.dispatch.shared.ActionException
Copyright © 2009-2012 The Apache Software Foundation. All Rights Reserved.