com.serotonin.m2m2.module
Class ServletDefinition

java.lang.Object
  extended by com.serotonin.m2m2.module.ModuleElementDefinition
      extended by com.serotonin.m2m2.module.ServletDefinition

public abstract class ServletDefinition
extends ModuleElementDefinition

A servlet definition provides the necessary information to register a servlet into the m2m2 instance. Servlets do not use JSP or HTML pages to render their responses, and so can be used for tasks such as image generation, export files, etc. Servlets can also be used to listen for incoming information, such as with the HTTP receiver data source. All methods in this definition are analogous to servlet and servlet-mapping elements of the web.xml file.

Author:
Matthew Lohbihler

Constructor Summary
ServletDefinition()
           
 
Method Summary
 int getInitOrder()
           
 java.util.Map<java.lang.String,java.lang.String> getInitParameters()
           
abstract  java.lang.Class<? extends javax.servlet.http.HttpServlet> getServletClass()
           
abstract  java.lang.String getUriPattern()
           
 
Methods inherited from class com.serotonin.m2m2.module.ModuleElementDefinition
getModule, initialize, uninstall
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletDefinition

public ServletDefinition()
Method Detail

getServletClass

public abstract java.lang.Class<? extends javax.servlet.http.HttpServlet> getServletClass()
Returns:
the implementation class of the servlet.

getUriPattern

public abstract java.lang.String getUriPattern()
Returns:
the URI pattern used to direct requests to this servlet.

getInitOrder

public int getInitOrder()
Returns:
the init order of the servlet

getInitParameters

public java.util.Map<java.lang.String,java.lang.String> getInitParameters()
Returns:
initialization parameters provided to the servlet instance