org.kuali.rice.ksb.messaging.web
Class MessageQueueAction

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by org.apache.struts.actions.BaseAction
          extended by org.apache.struts.actions.DispatchAction
              extended by org.kuali.rice.ksb.messaging.web.KSBAction
                  extended by org.kuali.rice.ksb.messaging.web.MessageQueueAction

public class MessageQueueAction
extends KSBAction

Struts action for interacting with the queue of messages.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Field Summary
 
Fields inherited from class org.apache.struts.actions.DispatchAction
clazz, log, methods, types
 
Fields inherited from class org.apache.struts.actions.BaseAction
messages
 
Fields inherited from class org.apache.struts.action.Action
servlet
 
Constructor Summary
MessageQueueAction()
           
 
Method Summary
 org.apache.struts.action.ActionForward clear(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 org.apache.struts.action.ActionForward delete(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 org.apache.struts.action.ActionForward edit(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 org.apache.struts.action.ActionMessages establishRequiredState(javax.servlet.http.HttpServletRequest request, org.apache.struts.action.ActionForm form)
          Sets up the expected state by retrieving the selected RouteQueue by RouteQueueId, and placing it in the ExistingRouteQueue member.
 org.apache.struts.action.ActionForward executeMessageFetcher(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  List<PersistedMessageBO> findRouteQueues(javax.servlet.http.HttpServletRequest request, MessageQueueForm routeQueueForm, int maxRows)
           
 org.apache.struts.action.ActionForward quickRequeueMessage(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  void quickRequeueMessage(PersistedMessageBO message)
          Performs a quick ReQueue of the indicated persisted message.
 org.apache.struts.action.ActionForward reset(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 org.apache.struts.action.ActionForward save(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 org.apache.struts.action.ActionForward saveAndResubmit(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 org.apache.struts.action.ActionForward start(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  AsynchronousCall unwrapPayload(PersistedMessageBO message)
          Extracts the payload from a PersistedMessageBO, attempts to convert it to the expected AsynchronousCall type, and returns it.
 org.apache.struts.action.ActionForward view(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 
Methods inherited from class org.kuali.rice.ksb.messaging.web.KSBAction
checkAuthorization, establishFinalState, execute, findMethodToCall, getKualiModuleService, getRoleQualification, isModuleLocked, noOp, refresh
 
Methods inherited from class org.apache.struts.actions.DispatchAction
cancelled, dispatchMethod, getMethod, getMethodName, getParameter, unspecified
 
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageQueueAction

public MessageQueueAction()
Method Detail

start

public org.apache.struts.action.ActionForward start(org.apache.struts.action.ActionMapping mapping,
                                                    org.apache.struts.action.ActionForm form,
                                                    javax.servlet.http.HttpServletRequest request,
                                                    javax.servlet.http.HttpServletResponse response)
                                             throws IOException,
                                                    javax.servlet.ServletException
Specified by:
start in class KSBAction
Throws:
IOException
javax.servlet.ServletException

save

public org.apache.struts.action.ActionForward save(org.apache.struts.action.ActionMapping mapping,
                                                   org.apache.struts.action.ActionForm form,
                                                   javax.servlet.http.HttpServletRequest request,
                                                   javax.servlet.http.HttpServletResponse response)
                                            throws Exception
Throws:
Exception

saveAndResubmit

public org.apache.struts.action.ActionForward saveAndResubmit(org.apache.struts.action.ActionMapping mapping,
                                                              org.apache.struts.action.ActionForm form,
                                                              javax.servlet.http.HttpServletRequest request,
                                                              javax.servlet.http.HttpServletResponse response)
                                                       throws Exception
Throws:
Exception

quickRequeueMessage

protected void quickRequeueMessage(PersistedMessageBO message)
Performs a quick ReQueue of the indicated persisted message. The net effect of this requeue is to set the Date to now, and to reset the RetryCount to zero. The payload is not modified.

Parameters:
message - The populated message to be requeued.

quickRequeueMessage

public org.apache.struts.action.ActionForward quickRequeueMessage(org.apache.struts.action.ActionMapping mapping,
                                                                  org.apache.struts.action.ActionForm form,
                                                                  javax.servlet.http.HttpServletRequest request,
                                                                  javax.servlet.http.HttpServletResponse response)
                                                           throws Exception
Throws:
Exception

edit

public org.apache.struts.action.ActionForward edit(org.apache.struts.action.ActionMapping mapping,
                                                   org.apache.struts.action.ActionForm form,
                                                   javax.servlet.http.HttpServletRequest request,
                                                   javax.servlet.http.HttpServletResponse response)
                                            throws IOException,
                                                   javax.servlet.ServletException
Throws:
IOException
javax.servlet.ServletException

view

public org.apache.struts.action.ActionForward view(org.apache.struts.action.ActionMapping mapping,
                                                   org.apache.struts.action.ActionForm form,
                                                   javax.servlet.http.HttpServletRequest request,
                                                   javax.servlet.http.HttpServletResponse response)
                                            throws Exception
Throws:
Exception

reset

public org.apache.struts.action.ActionForward reset(org.apache.struts.action.ActionMapping mapping,
                                                    org.apache.struts.action.ActionForm form,
                                                    javax.servlet.http.HttpServletRequest request,
                                                    javax.servlet.http.HttpServletResponse response)
                                             throws Exception
Throws:
Exception

clear

public org.apache.struts.action.ActionForward clear(org.apache.struts.action.ActionMapping mapping,
                                                    org.apache.struts.action.ActionForm form,
                                                    javax.servlet.http.HttpServletRequest request,
                                                    javax.servlet.http.HttpServletResponse response)
                                             throws Exception
Throws:
Exception

delete

public org.apache.struts.action.ActionForward delete(org.apache.struts.action.ActionMapping mapping,
                                                     org.apache.struts.action.ActionForm form,
                                                     javax.servlet.http.HttpServletRequest request,
                                                     javax.servlet.http.HttpServletResponse response)
                                              throws Exception
Throws:
Exception

executeMessageFetcher

public org.apache.struts.action.ActionForward executeMessageFetcher(org.apache.struts.action.ActionMapping mapping,
                                                                    org.apache.struts.action.ActionForm form,
                                                                    javax.servlet.http.HttpServletRequest request,
                                                                    javax.servlet.http.HttpServletResponse response)
                                                             throws Exception
Throws:
Exception

establishRequiredState

public org.apache.struts.action.ActionMessages establishRequiredState(javax.servlet.http.HttpServletRequest request,
                                                                      org.apache.struts.action.ActionForm form)
                                                               throws Exception
Sets up the expected state by retrieving the selected RouteQueue by RouteQueueId, and placing it in the ExistingRouteQueue member. Called by the super's Execute method on every request.

Specified by:
establishRequiredState in class KSBAction
Throws:
Exception

findRouteQueues

protected List<PersistedMessageBO> findRouteQueues(javax.servlet.http.HttpServletRequest request,
                                                   MessageQueueForm routeQueueForm,
                                                   int maxRows)

unwrapPayload

protected AsynchronousCall unwrapPayload(PersistedMessageBO message)
Extracts the payload from a PersistedMessageBO, attempts to convert it to the expected AsynchronousCall type, and returns it. Throws an IllegalArgumentException if the decoded payload isnt of the expected type.

Parameters:
message - The populated PersistedMessageBO object to extract the payload from.
Returns:
Returns the payload if one is present and it can be deserialized, otherwise returns null.


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.