Package deltix.qsrv.hf.pub
Class DACEntitlementIDComposer
- java.lang.Object
-
- deltix.util.security.EntitlementIDComposer<DACEntitlementIDComposer>
-
- deltix.qsrv.hf.pub.DACEntitlementIDComposer
-
- All Implemented Interfaces:
EntitlementID
public class DACEntitlementIDComposer extends EntitlementIDComposer<DACEntitlementIDComposer>
Allows to store a set of binary entitlements in one field.
Usage:
final XXXMessage msg = ... final DACEntitlementIDComposer composer = new DACEntitlementIDComposer(msg); composer.start(140) .applyEntry(new byte[] {2, 0, 1, 2, 3, 4}, 1, 5) .applyEntry(new byte[] {1, 2, 3}, 0, 3) .commit(); // Now msg.entitlementId is set. // Let's read it... int tacID140 = composer.read(); System.out.println("TAC PlugIn ID: " + tacID140); System.out.println("Number of entries: " + composer.numberOfEntries()); for (int i = 0; i < composer.numberOfEntries(); i++) { System.out.println("Entry " + i + " offset/length: " + composer.entryOffset(i) + '/' + composer.entryLength(i)); // Get the next entry from composer.content() with its offset/length... }
-
-
Field Summary
-
Fields inherited from class deltix.util.security.EntitlementIDComposer
content, entriesOffset, isNull
-
-
Constructor Summary
Constructors Constructor Description DACEntitlementIDComposer()
DACEntitlementIDComposer(deltix.timebase.api.messages.DacMessageInterface holder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DACEntitlementIDComposer
appendAllEntries(DACEntitlementIDComposer from)
DACEntitlementIDComposer
commit()
DACEntitlementIDComposer
commit(deltix.timebase.api.messages.DacMessageInterface holder)
int
getTACPlugInID()
int
read()
int
read(byte[] bytes, int offset, int length)
int
read(deltix.timebase.api.messages.DacMessageInterface holder)
int
read(rtmath.containers.interfaces.BinaryArrayReadOnly entitlementId)
DACEntitlementIDComposer
start(int tacPlugInID)
Starts preparing Entitlement ID.DACEntitlementIDComposer
start(DACEntitlementIDComposer from)
DACEntitlementIDComposer
startNull()
java.lang.String
toString()
-
Methods inherited from class deltix.util.security.EntitlementIDComposer
appendEntry, appendEntry, content, entryLength, entryOffset, isNull, numberOfEntries, reset, resetContent, setSafely
-
-
-
-
Method Detail
-
startNull
public DACEntitlementIDComposer startNull()
-
start
public DACEntitlementIDComposer start(int tacPlugInID)
Starts preparing Entitlement ID.- Parameters:
tacPlugInID
- - stores as unsigned byte (should be >0 and <=255)- Returns:
- this
-
start
public DACEntitlementIDComposer start(DACEntitlementIDComposer from)
-
appendAllEntries
public DACEntitlementIDComposer appendAllEntries(DACEntitlementIDComposer from)
- Overrides:
appendAllEntries
in classEntitlementIDComposer<DACEntitlementIDComposer>
-
getTACPlugInID
public int getTACPlugInID()
-
commit
public DACEntitlementIDComposer commit()
-
commit
public DACEntitlementIDComposer commit(deltix.timebase.api.messages.DacMessageInterface holder)
-
read
public int read()
-
read
public int read(deltix.timebase.api.messages.DacMessageInterface holder)
-
read
public int read(rtmath.containers.interfaces.BinaryArrayReadOnly entitlementId)
-
read
public int read(byte[] bytes, int offset, int length)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classEntitlementIDComposer<DACEntitlementIDComposer>
-
-