public class

UnitNotification

extends Object
implements IUnitNotification
java.lang.Object
   ↳ com.pnfsoftware.jeb.core.units.UnitNotification

Class Overview

Standard implementation of a notification.

Summary

Public Constructors
UnitNotification(NotificationType type, String description, String address, String key)
Create a notification.
UnitNotification(NotificationType type, String description, String address)
Create a notification.
UnitNotification(NotificationType type, String description)
Create a notification.
UnitNotification(IUnitNotification src)
Generic copy constructor.
Public Methods
String getAddress()
Retrieve the optional address of this notification, if relevant.
String getDescription()
Get a custom description of the notification.
String getKey()
Retrieve the notification key (or name).
long getTimestampMs()
Retrieve the creation timestamp of this notification.
NotificationType getType()
Get the notification type.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.pnfsoftware.jeb.core.units.IUnitNotification

Public Constructors

public UnitNotification (NotificationType type, String description, String address, String key)

Create a notification.

Parameters
type mandatory type
description optional description string
address optional address, useful for interactive units
key unique key; if null, a random key will be generated and assigned to the notification

public UnitNotification (NotificationType type, String description, String address)

Create a notification. A random key will be generated and assigned to the notification.

Parameters
type mandatory type
description optional description string
address optional address, useful for interactive units

public UnitNotification (NotificationType type, String description)

Create a notification. A random key will be generated and assigned to the notification.

Parameters
type mandatory type
description optional description string

public UnitNotification (IUnitNotification src)

Generic copy constructor.

Public Methods

public String getAddress ()

Retrieve the optional address of this notification, if relevant. If the unit does support addressing (ie, the unit implements IAddressableUnit), that field may be used by clients for easy navigation to the location of interest.

Returns
  • the optional address

public String getDescription ()

Get a custom description of the notification. This comes as a complement of the type, if necessary.

Returns
  • an optional description string

public String getKey ()

Retrieve the notification key (or name). For a given unit, only one notification with a given key may exist; adding a notification will erase a previously existing one.

public long getTimestampMs ()

Retrieve the creation timestamp of this notification.

public NotificationType getType ()

Get the notification type.

Returns
  • the non-null type

public String toString ()