CDescriptionOfRecord

This is a small helper class for describing a nano service or message in a message API. A nano services description includes the nano service ID (a record ID) and the description text.

Constructor

The constructor takes the ID of the record and the description.

public CNanoServiceDesc(@NotNull final IId aId,
                        @NotNull final String aDescription);

From the record

This factory method takes the description from a record of type CRecordDescriptionOfRecord.

@NotNull
public static CDescriptionOfRecord fromRecord(@NotNull final CRecord aRecord) throws CException;

Getter

The ID and description can be fetched using getter methods.

@NotNull
public IId getId();
@NotNull
public String getDescription();

Wrap in a record

To send the description via message, the data must be transferred to a record.

public CRecord valueToRecord() throws CException;

Notice

The class supports the equals and hashCode methods as well as the Comparable interface.

nyssr.net - Innovative Distributed System