Class CallServiceTag

  • All Implemented Interfaces:
    Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

    public class CallServiceTag
    extends javax.servlet.jsp.tagext.BodyTagSupport
    Tag to call a method on an OSGi service. This tags calls a method on a given named service and puts the result in a variable. There are three required parameters:
    • var - The name of the variable to deposit the result in.
    • serviceName - The fully qualified name of the service interface to call.
    • methodName - The name of the method to call.
    Parameters for the method can be specified by nesting setArgument tags inside the callservice tag. Usage example:
     <wm:callService var="result" serviceName="nl.gx.webmanager.services.sessionmanager.SessionManager"
       methodName="createSession" >
       <wm:argument type="java.lang.Integer" value="2357" />
     </wm:callservice>
     
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport

        bodyContent
      • Fields inherited from class javax.servlet.jsp.tagext.TagSupport

        id, pageContext
      • Fields inherited from interface javax.servlet.jsp.tagext.BodyTag

        EVAL_BODY_BUFFERED, EVAL_BODY_TAG
      • Fields inherited from interface javax.servlet.jsp.tagext.IterationTag

        EVAL_BODY_AGAIN
      • Fields inherited from interface javax.servlet.jsp.tagext.Tag

        EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
    • Constructor Summary

      Constructors 
      Constructor Description
      CallServiceTag()  
    • Constructor Detail

      • CallServiceTag

        public CallServiceTag()
    • Method Detail

      • setVar

        public void setVar​(String var)
        Specifies the JSP variable to store the result in.
        Parameters:
        var - name of the var to which the presentation object should be assigned
      • getVar

        public String getVar()
        Return the JSP variable to store the result in.
        Returns:
        name of the var to which the presentation object should be assigned.
      • setServiceName

        public void setServiceName​(String serviceName)
        Set the name of the service to call.
        Parameters:
        serviceName - The fully qualified name of the service interface.
      • getServiceName

        public String getServiceName()
        Get the name of the service to call.
        Returns:
        The fully qualified name of the service interface.
      • setMethodName

        public void setMethodName​(String methodName)
        Set the name of the method to call.
        Parameters:
        methodName - The name of the method to call.
      • getMethodName

        public String getMethodName()
        Get the name of the method to call.
        Returns:
        The name of the method to call.
      • doStartTag

        public int doStartTag()
                       throws javax.servlet.jsp.JspException
        Specified by:
        doStartTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doStartTag in class javax.servlet.jsp.tagext.BodyTagSupport
        Throws:
        javax.servlet.jsp.JspException
      • doEndTag

        public int doEndTag()
                     throws javax.servlet.jsp.JspException
        Specified by:
        doEndTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport
        Throws:
        javax.servlet.jsp.JspException