Package org.openas2

Interface Component

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void destroy()
      Component lifecycle hook.
      java.lang.String getName()
      Returns a name for the component.
      java.util.Map<java.lang.String,​java.lang.String> getParameters()
      Returns the parameters used to initialize this Component, and can also be used to modify parameters.
      Session getSession()
      Returns the Session used to initialize this Component.
      void init​(Session session, java.util.Map<java.lang.String,​java.lang.String> parameters)
      Component lifecycle hook.
    • Method Detail

      • getName

        java.lang.String getName()
        Returns a name for the component. These names are not guaranteed to be unique, and are intended for display and logging. Generally this is the class name of the Component object, without package information.
        Returns:
        name of the component
      • getParameters

        java.util.Map<java.lang.String,​java.lang.String> getParameters()
        Returns the parameters used to initialize this Component, and can also be used to modify parameters.
        Returns:
        map of parameter name to parameter value
      • getSession

        Session getSession()
        Returns the Session used to initialize this Component. The returned session is also used to locate other components if needed.
        Returns:
        this component's session
      • init

        void init​(Session session,
                  java.util.Map<java.lang.String,​java.lang.String> parameters)
           throws OpenAS2Exception
        Component lifecycle hook. After creating a Component object, this method should be called to set any parameters used by the component. Component implementations typically have required parameter checking and code to start timers and threads within this method.
        Parameters:
        session - the component uses this object to access other components
        parameters - configuration values for the component
        Throws:
        OpenAS2Exception - If an error occurs while initializing the component
        See Also:
        Session
      • destroy

        void destroy()
              throws java.lang.Exception
        Component lifecycle hook. If lifecycle of Component requires a destroy function this method can be used.
        Throws:
        java.lang.Exception - Something went wrong
        See Also:
        init(Session, Map), Session