Class EventMethodModel

  • All Implemented Interfaces:
    java.io.Serializable, org.apache.xmlgraphics.util.XMLizable

    public class EventMethodModel
    extends java.lang.Object
    implements java.io.Serializable, org.apache.xmlgraphics.util.XMLizable
    Represents an event method. Each method in an event producer interface will result in one instance of EventMethodModel.
    See Also:
    Serialized Form
    • Field Detail

      • methodName

        private java.lang.String methodName
      • params

        private java.util.List params
      • exceptionClass

        private java.lang.String exceptionClass
    • Constructor Detail

      • EventMethodModel

        public EventMethodModel​(java.lang.String methodName,
                                EventSeverity severity)
        Creates an new instance.
        Parameters:
        methodName - the event method's name
        severity - the event severity
    • Method Detail

      • addParameter

        public void addParameter​(EventMethodModel.Parameter param)
        Adds a method parameter.
        Parameters:
        param - the method parameter
      • addParameter

        public EventMethodModel.Parameter addParameter​(java.lang.Class type,
                                                       java.lang.String name)
        Adds a method parameter.
        Parameters:
        type - the type of the parameter
        name - the name of the parameter
        Returns:
        the resulting Parameter instance
      • setMethodName

        public void setMethodName​(java.lang.String name)
        Sets the event method name.
        Parameters:
        name - the event name
      • getMethodName

        public java.lang.String getMethodName()
        Returns the event method name
        Returns:
        the event name
      • setSeverity

        public void setSeverity​(EventSeverity severity)
        Sets the event's severity level.
        Parameters:
        severity - the severity
      • getSeverity

        public EventSeverity getSeverity()
        Returns the event's severity level.
        Returns:
        the severity
      • getParameters

        public java.util.List getParameters()
        Returns an unmodifiable list of parameters for this event method.
        Returns:
        the list of parameters
      • setExceptionClass

        public void setExceptionClass​(java.lang.String exceptionClass)
        Sets the primary exception class for this event method. Note: Not all event methods throw exceptions!
        Parameters:
        exceptionClass - the exception class
      • getExceptionClass

        public java.lang.String getExceptionClass()
        Returns the primary exception class for this event method. This method returns null if the event is only informational or just a warning.
        Returns:
        the primary exception class or null
      • toSAX

        public void toSAX​(org.xml.sax.ContentHandler handler)
                   throws org.xml.sax.SAXException
        Specified by:
        toSAX in interface org.apache.xmlgraphics.util.XMLizable
        Throws:
        org.xml.sax.SAXException