Class BlinkIdentity
java.lang.Object
com.tccc.kos.commons.core.service.blink.BlinkIdentity
- Direct Known Subclasses:
BinaryMsgIdentity
Base class for blink identity information. When an blink client connects to
java it first sends a null terminated json encoded identity payload that
describes the session. This is used to determine which session to create for
the connection as well as how to configure the session, including protocol
details and such. Each session can extend this class to define an identity
object specific to that session so it can be decoded and passed to the
session, allowing it to configure itself according to the needs of the
client.
For example BinaryMsgSession uses a binary encoded protocol. The client, which is typically C code running on native hardware, may be running big endian or little endian. The identity payload can describe the data encoding so that java automatically encodes/decodes the data the correct way.
- Since:
- 1.0
- Version:
- 2022-08-30
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()
Return the nodeId of the identity.int
boolean
void
void
setNodeName
(String nodeName) void
setNodeType
(String nodeType) void
setPrimary
(boolean primary) void
setProtocol
(String protocol) void
setRevision
(int revision) toString()
void
validate()
-
Constructor Details
-
BlinkIdentity
public BlinkIdentity()
-
-
Method Details
-
validate
public void validate() -
getNodeId
Return the nodeId of the identity. -
getName
-
isPrimary
public boolean isPrimary() -
getNodeType
-
getNodeName
-
getProtocol
-
getRevision
public int getRevision() -
setName
-
setPrimary
public void setPrimary(boolean primary) -
setNodeType
-
setNodeName
-
setProtocol
-
setRevision
public void setRevision(int revision) -
toString
-