nn.pp.core

## Class NotificationEvent

- java.lang.Object
- - nn.pp.core.NotificationEvent

- All Implemented Interfaces:
    INotificationEvent

      public abstract class NotificationEvent
      extends java.lang.Object
      implements INotificationEvent

  This event is sent over the network protocols to the clients and represents the error/info messages for the protocols.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface nn.pp.core.INotificationEvent

      `INotificationEvent.Severity`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `clientGeneratedError`
    `protected int` | `errorCode`
    `protected int` | `flags`
    `static byte` | `ProtocolMSP` Event belongs to MSP Protocol
    `static byte` | `ProtocolRDM_1` Event belongs to RDM Protocol
    `static byte` | `ProtocolRDM_2` Event belongs to RDM Protocol
    `static byte` | `ProtocolRFB` Event belongs to RFB Protocol
    `static byte` | `SeverityDebug` Event is an Debug event
    `static byte` | `SeverityError` Event is an Error event
    `static byte` | `SeverityInfo` Event is an Info event
    `static byte` | `SeverityWarning` Event is an Warning event
    `static byte` | `UserNotfFlagQuit` The quit flag, means the connection should be closed

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NotificationEvent(int flags, int errorCode)` Construct a notification event
    `NotificationEvent(int flags, int errorCode, boolean clientOnly, java.lang.String errorMessage)` Construct a notification event

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract INotificationEvent` | `clone()` Create a clone of this event
    `int` | `getErrorCode()` Get the complete error code associated with this event
    `int` | `getGroupId()` Get the group ID associated with this event
    `abstract java.lang.String` | `getMessage()` Get a verbose message string associated with this event
    `int` | `getMessageGroupErrorCode()` Get the error number in the message group
    `int` | `getMessageGroupId()` Get the ID of the message group
    `int` | `getSeverity()`
    `INotificationEvent.Severity` | `getSeverityType()` Get the severity of this event
    `boolean` | `isClientGeneratedError()` Is the event generated by the client or the KX?
    `boolean` | `isDebug()` Is this a debug event?
    `boolean` | `isError()` Is this an error event?
    `boolean` | `isInfo()` Is this an info event?
    `boolean` | `isMSP()` Is this a MSP protocol event?
    `boolean` | `isQuit()` Is this an "quit" event?
    `boolean` | `isRFB()` Is this a RFB protocol event?
    `boolean` | `isWarning()` Is this an warning event?
    `void` | `setClientgeneratedError(boolean error)`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### flags

          protected int flags

    - #### errorCode

          protected int errorCode

    - #### clientGeneratedError

          protected boolean clientGeneratedError

    - #### ProtocolRFB

          public static final byte ProtocolRFB

      Event belongs to RFB Protocol
      See Also:
        Constant Field Values

    - #### ProtocolRDM_1

          public static final byte ProtocolRDM_1

      Event belongs to RDM Protocol
      See Also:
        Constant Field Values

    - #### ProtocolMSP

          public static final byte ProtocolMSP

      Event belongs to MSP Protocol
      See Also:
        Constant Field Values

    - #### ProtocolRDM_2

          public static final byte ProtocolRDM_2

      Event belongs to RDM Protocol
      See Also:
        Constant Field Values

    - #### SeverityError

          public static final byte SeverityError

      Event is an Error event
      See Also:
        Constant Field Values

    - #### SeverityWarning

          public static final byte SeverityWarning

      Event is an Warning event
      See Also:
        Constant Field Values

    - #### SeverityInfo

          public static final byte SeverityInfo

      Event is an Info event
      See Also:
        Constant Field Values

    - #### SeverityDebug

          public static final byte SeverityDebug

      Event is an Debug event
      See Also:
        Constant Field Values

    - #### UserNotfFlagQuit

          public static final byte UserNotfFlagQuit

      The quit flag, means the connection should be closed
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### NotificationEvent

          public NotificationEvent(int flags,
                                   int errorCode)

      Construct a notification event
      Parameters:
        `flags` - flags associated with the event
        `errorCode` - the error code

    - #### NotificationEvent

          public NotificationEvent(int flags,
                                   int errorCode,
                                   boolean clientOnly,
                                   java.lang.String errorMessage)

      Construct a notification event
      Parameters:
        `flags` - flags associated with the event
        `errorCode` - the error code
        `clientOnly` - true if a client side event, false if generated by the KX
        `errorMessage` - an error message as string

  - ### Method Detail

    - #### getErrorCode

          public int getErrorCode()

      Description copied from interface: `INotificationEvent`
      Get the complete error code associated with this event
      Specified by:
        `getErrorCode` in interface `INotificationEvent`
      Returns:
        the error code

    - #### getGroupId

          public int getGroupId()

      Description copied from interface: `INotificationEvent`
      Get the group ID associated with this event
      Specified by:
        `getGroupId` in interface `INotificationEvent`
      Returns:
        the error group

    - #### getMessageGroupErrorCode

          public int getMessageGroupErrorCode()

      Description copied from interface: `INotificationEvent`
      Get the error number in the message group
      Specified by:
        `getMessageGroupErrorCode` in interface `INotificationEvent`
      Returns:
        the error number in the message group

    - #### getMessageGroupId

          public int getMessageGroupId()

      Description copied from interface: `INotificationEvent`

      Get the ID of the message group

      This is a sub-group within the groups, e.g. for Rfb events, this may be "switching", "authentication" or "mass storage".

      Specified by:
        `getMessageGroupId` in interface `INotificationEvent`
      Returns:
        the ID of the message group

    - #### getSeverityType

          public INotificationEvent.Severity getSeverityType()

      Description copied from interface: `INotificationEvent`
      Get the severity of this event
      Specified by:
        `getSeverityType` in interface `INotificationEvent`
      Returns:
        the severity of this event

    - #### getSeverity

          public int getSeverity()

    - #### isDebug

          public boolean isDebug()

      Description copied from interface: `INotificationEvent`
      Is this a debug event?
      Specified by:
        `isDebug` in interface `INotificationEvent`
      Returns:
        true if this is a debug event, false otherwise

    - #### isError

          public boolean isError()

      Description copied from interface: `INotificationEvent`
      Is this an error event?
      Specified by:
        `isError` in interface `INotificationEvent`
      Returns:
        true if this is a error event, false otherwise

    - #### isWarning

          public boolean isWarning()

      Description copied from interface: `INotificationEvent`
      Is this an warning event?
      Specified by:
        `isWarning` in interface `INotificationEvent`
      Returns:
        true if this is a warning event, false otherwise

    - #### isInfo

          public boolean isInfo()

      Description copied from interface: `INotificationEvent`
      Is this an info event?
      Specified by:
        `isInfo` in interface `INotificationEvent`
      Returns:
        true if this is a info event, false otherwise

    - #### isQuit

          public boolean isQuit()

      Description copied from interface: `INotificationEvent`

      Is this an "quit" event?

      That means, the event is so severe that the client connection can no longer work. The client is supposed to quit the connection

      Specified by:
        `isQuit` in interface `INotificationEvent`
      Returns:
        true if this is a "quit" event, false otherwise

    - #### isMSP

          public boolean isMSP()

      Description copied from interface: `INotificationEvent`
      Is this a MSP protocol event?
      Specified by:
        `isMSP` in interface `INotificationEvent`
      Returns:
        true if this is a MSP protocol event, false otherwise

    - #### isRFB

          public boolean isRFB()

      Description copied from interface: `INotificationEvent`
      Is this a RFB protocol event?
      Specified by:
        `isRFB` in interface `INotificationEvent`
      Returns:
        true if this is a RFB protocol event, false otherwise

    - #### setClientgeneratedError

          public void setClientgeneratedError(boolean error)

    - #### isClientGeneratedError

          public boolean isClientGeneratedError()

      Description copied from interface: `INotificationEvent`
      Is the event generated by the client or the KX?
      Specified by:
        `isClientGeneratedError` in interface `INotificationEvent`
      Returns:
        true if generated by the client, false if generated by the KX

    - #### getMessage

          public abstract java.lang.String getMessage()

      Description copied from interface: `INotificationEvent`
      Get a verbose message string associated with this event
      Specified by:
        `getMessage` in interface `INotificationEvent`
      Returns:
        the error message

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### clone

          public abstract INotificationEvent clone()

      Description copied from interface: `INotificationEvent`
      Create a clone of this event
      Specified by:
        `clone` in interface `INotificationEvent`
      Overrides:
        `clone` in class `java.lang.Object`
      Returns:
        the clone of this event

Copyright © 2025 Raritan Inc. All Rights Reserved.