Class AbstractRequest<ParamType,​IdType>

  • Type Parameters:
    ParamType - params element type parameter
    IdType - id type parameter
    Direct Known Subclasses:
    Notification, Request

    public abstract class AbstractRequest<ParamType,​IdType>
    extends Identifiable<IdType>
    An abstract class for requests and notifications.
    Author:
    Jin Kwon <onacit_at_gmail.com>
    • Field Detail

      • PROPERTY_NAME_METHOD

        public static final String PROPERTY_NAME_METHOD
        A property name for $.method. The value is "method".
        See Also:
        Constant Field Values
      • PROPERTY_NAME_PARAMS

        public static final String PROPERTY_NAME_PARAMS
        A property name for $.params. The value is "params".
        See Also:
        Constant Field Values
    • Constructor Detail

      • AbstractRequest

        public AbstractRequest()
        Creates a new instance.
    • Method Detail

      • toString

        public String toString()
        Returns the string representation of the object.
        Overrides:
        toString in class Identifiable<IdType>
        Returns:
        a string representation of the object.
      • equals

        public boolean equals​(Object obj)
        Indicates whether some other object is "equal to" this one.
        Overrides:
        equals in class Identifiable<IdType>
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if this object is the same as the obj argument; false otherwise.
      • hashCode

        public int hashCode()
        Returns a hash code value for the object.
        Overrides:
        hashCode in class Identifiable<IdType>
        Returns:
        a hash code value for this object.
      • getMethod

        public String getMethod()
        Returns the current value of "method" property.
        Returns:
        the current value of "method" property.
      • setMethod

        public void setMethod​(String method)
        Replaces the current value of "method" property with specified value.
        Parameters:
        method - new value for "method" property.
      • getParams

        public List<ParamType> getParams()
        Returns the current value of "params" property.
        Returns:
        the current value of "params" property.
      • setParams

        public void setParams​(List<ParamType> params)
        Replaces the current value of "params" property with specified value.
        Parameters:
        params - new value for "params" property.