org.opencrx.kernel.workflow.servlet
Class SubscriptionHandlerServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.opencrx.kernel.workflow.servlet.SubscriptionHandlerServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class SubscriptionHandlerServlet
extends HttpServlet

The SubscriptionHandlerServlet 'listens' for object modifications on incoming audit entries. For each active subscription (i.e. topic target pattern) which's filter (object identity and attribute filters) matches the modified object, the corresponding workflows are executed.

See Also:
Serialized Form

Constructor Summary
SubscriptionHandlerServlet()
           
 
Method Summary
protected  void doGet(HttpServletRequest req, HttpServletResponse res)
           
protected  void doPost(HttpServletRequest req, HttpServletResponse res)
           
protected  void handleRequest(HttpServletRequest req, HttpServletResponse res)
           
 void handleSubscriptions(String id, String providerName, String segmentName, HttpServletRequest req, HttpServletResponse res)
           
 void init(ServletConfig config)
           
 boolean subscriptionAcceptsMessage(Subscription subscription, AuditEntry auditEntry)
           
protected  boolean testFilterValue(String filterName, String filterValue, Object message)
           
 boolean topicAcceptsObject(String providerName, String segmentName, Topic topic, String objectXri)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubscriptionHandlerServlet

public SubscriptionHandlerServlet()
Method Detail

init

public void init(ServletConfig config)
          throws ServletException
Specified by:
init in interface Servlet
Overrides:
init in class GenericServlet
Throws:
ServletException

testFilterValue

protected boolean testFilterValue(String filterName,
                                  String filterValue,
                                  Object message)

subscriptionAcceptsMessage

public boolean subscriptionAcceptsMessage(Subscription subscription,
                                          AuditEntry auditEntry)

topicAcceptsObject

public boolean topicAcceptsObject(String providerName,
                                  String segmentName,
                                  Topic topic,
                                  String objectXri)

handleSubscriptions

public void handleSubscriptions(String id,
                                String providerName,
                                String segmentName,
                                HttpServletRequest req,
                                HttpServletResponse res)
                         throws IOException
Throws:
IOException

handleRequest

protected void handleRequest(HttpServletRequest req,
                             HttpServletResponse res)
                      throws ServletException,
                             IOException
Throws:
ServletException
IOException

doGet

protected void doGet(HttpServletRequest req,
                     HttpServletResponse res)
              throws ServletException,
                     IOException
Overrides:
doGet in class HttpServlet
Throws:
ServletException
IOException

doPost

protected void doPost(HttpServletRequest req,
                      HttpServletResponse res)
               throws ServletException,
                      IOException
Overrides:
doPost in class HttpServlet
Throws:
ServletException
IOException


This software is published under the BSD license. Copyright © 2003-2010, CRIXP AG, Switzerland, All rights reserved. Use is subject to license terms.