<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>IDs and Addresses on sillysky.net</title>
    <link>https://sillysky.net/docs/nyssr/ids-and-addresses/</link>
    <description>Recent content in IDs and Addresses on sillysky.net</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Tue, 14 Oct 2025 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://sillysky.net/docs/nyssr/ids-and-addresses/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>CIdFactory</title>
      <link>https://sillysky.net/docs/nyssr/ids-and-addresses/cidfactory/</link>
      <pubDate>Tue, 14 Oct 2025 00:00:00 +0000</pubDate>
      <guid>https://sillysky.net/docs/nyssr/ids-and-addresses/cidfactory/</guid>
      <description>&lt;p&gt;We use a factory to create &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/id/&#34;&gt;IDs&lt;/a&gt;. The reason for this is the&#xA;possibility to introduce additional ID types. The CIdFactory is therefore also&#xA;a registry for factories of type &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/iidfactory/&#34;&gt;IIdFactory&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;We have not designed the CIdFactory as a service, because in the code many&#xA;static IDs are defined.&lt;/p&gt;&#xA;&lt;h2 id=&#34;create-an-id&#34;&gt;Create an ID&lt;/h2&gt;&#xA;&lt;p&gt;The simplest method is to create &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/id/&#34;&gt;IDs&lt;/a&gt; from an integer, from a string&#xA;or from a UUID:&lt;/p&gt;&#xA;&lt;pre class=&#34;ss-javacode&#34;&gt;&lt;code class=&#34;language-java&#34;&gt;@NotNull&#xA;public static &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/id/&#34;&gt;IId&lt;/a&gt; fromObject(@Nullable final Object aId);&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Beispiele:&lt;/p&gt;</description>
    </item>
    <item>
      <title>CNamespaceAddress</title>
      <link>https://sillysky.net/docs/nyssr/ids-and-addresses/cnamespaceaddress/</link>
      <pubDate>Tue, 14 Oct 2025 00:00:00 +0000</pubDate>
      <guid>https://sillysky.net/docs/nyssr/ids-and-addresses/cnamespaceaddress/</guid>
      <description>&lt;p&gt;The namespace address is the address of a &lt;a href=&#34;https://sillysky.net/docs/nyssr/namespaces/&#34;&gt;namespace&lt;/a&gt;. It consists of&#xA;a &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/cnodeaddress/&#34;&gt;node address&lt;/a&gt; to identify the &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/nodeid/&#34;&gt;node&lt;/a&gt; and a &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/nid/&#34;&gt;namespace ID&lt;/a&gt;. In string form, the address is structured like this:&#xA;&amp;quot;nid.nodeId.segmentId&amp;quot;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://sillysky.net/images/LigneClaire/doc/IDsAndAddresses.webp&#34; data-alt=&#34;IDs and addresses&#34;&gt;&lt;img class=&#34;uk-align-left&#34; alt=&#34;IDs and addresses&#34; src=&#34;https://sillysky.net/images/LigneClaire/doc/IDsAndAddresses.webp&#34; width=&#34;600&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;constructors&#34;&gt;Constructors&lt;/h2&gt;&#xA;&lt;p&gt;The default constructor creates an invalid address.&lt;/p&gt;&#xA;&lt;pre class=&#34;ss-javacode&#34;&gt;&lt;code class=&#34;language-java&#34;&gt;final &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/cnamespaceaddress/&#34;&gt;CNamespaceAddress&lt;/a&gt; a = new &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/cnamespaceaddress/&#34;&gt;CNamespaceAddress&lt;/a&gt;();&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There is a constructor that takes a &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/nid/&#34;&gt;namespace ID&lt;/a&gt; and creates a&#xA;local address. The &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/cnodeaddress/&#34;&gt;node address&lt;/a&gt; remains empty. Empty or invalid&#xA;node addresses are considered local addresses.&lt;/p&gt;</description>
    </item>
    <item>
      <title>CNodeAddress</title>
      <link>https://sillysky.net/docs/nyssr/ids-and-addresses/cnodeaddress/</link>
      <pubDate>Tue, 14 Oct 2025 00:00:00 +0000</pubDate>
      <guid>https://sillysky.net/docs/nyssr/ids-and-addresses/cnodeaddress/</guid>
      <description>&lt;p&gt;The node address is the rear half of a &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/ctargetaddress/&#34;&gt;target address&lt;/a&gt;, consisting&#xA;of &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/nodeid/&#34;&gt;NodeId&lt;/a&gt; and &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/csegmentid/&#34;&gt;SegmentId&lt;/a&gt;. The node address can be used to&#xA;identify a &lt;a href=&#34;https://sillysky.net/docs/nyssr/basics/node/&#34;&gt;node&lt;/a&gt; precisely.&lt;/p&gt;&#xA;&lt;h2 id=&#34;constructors-and-static-factory-methods&#34;&gt;Constructors and static factory methods&lt;/h2&gt;&#xA;&lt;p&gt;The default constructor is used to create the local node address, i.e. the&#xA;address, which belongs to the own &lt;a href=&#34;https://sillysky.net/docs/nyssr/basics/node/&#34;&gt;node&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;pre class=&#34;ss-javacode&#34;&gt;&lt;code class=&#34;language-java&#34;&gt;final &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/cnodeaddress/&#34;&gt;CNodeAddress&lt;/a&gt; n = new &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/cnodeaddress/&#34;&gt;CNodeAddress&lt;/a&gt;();&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;An invalid or empty node address is created with the constructor, which takes&#xA;a &lt;code&gt;Boolean&lt;/code&gt;. The value does not matter. However, it is better to use the&#xA;&lt;code&gt;EMPTY&lt;/code&gt; public field here.&lt;/p&gt;</description>
    </item>
    <item>
      <title>CNodeId</title>
      <link>https://sillysky.net/docs/nyssr/ids-and-addresses/nodeid/</link>
      <pubDate>Tue, 14 Oct 2025 00:00:00 +0000</pubDate>
      <guid>https://sillysky.net/docs/nyssr/ids-and-addresses/nodeid/</guid>
      <description>&lt;p&gt;The NodeId has its own class CNodeId , which is derived from the&#xA;&lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/id/&#34;&gt;IId&lt;/a&gt;. It is unique in a segment and can be freely assigned.&lt;/p&gt;&#xA;&lt;h2 id=&#34;empty-nodeid&#34;&gt;Empty NodeId&lt;/h2&gt;&#xA;&lt;p&gt;There is a public &lt;code&gt;EMPTY&lt;/code&gt; field, which is an invalid NodeId .&lt;/p&gt;&#xA;&lt;h2 id=&#34;constructors&#34;&gt;Constructors&lt;/h2&gt;&#xA;&lt;p&gt;The default constructor creates an invalid ID.&lt;/p&gt;&#xA;&lt;pre class=&#34;ss-javacode&#34;&gt;&lt;code class=&#34;language-java&#34;&gt;public &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/nodeid/&#34;&gt;CNodeId&lt;/a&gt;();&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A NodeId can be made from a normal &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/id/&#34;&gt;ID&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;pre class=&#34;ss-javacode&#34;&gt;&lt;code class=&#34;language-java&#34;&gt;public &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/nodeid/&#34;&gt;CNodeId&lt;/a&gt;(@NotNull final &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/id/&#34;&gt;IId&lt;/a&gt; aId);&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Probably the most used is the constructor, which takes a string.&lt;/p&gt;&#xA;&lt;pre class=&#34;ss-javacode&#34;&gt;&lt;code class=&#34;language-java&#34;&gt;public &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/nodeid/&#34;&gt;CNodeId&lt;/a&gt;(@NotNull final String aId);&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;There is a factory method that creates a NodeId from an object.&lt;/p&gt;</description>
    </item>
    <item>
      <title>CSegmentId</title>
      <link>https://sillysky.net/docs/nyssr/ids-and-addresses/csegmentid/</link>
      <pubDate>Tue, 14 Oct 2025 00:00:00 +0000</pubDate>
      <guid>https://sillysky.net/docs/nyssr/ids-and-addresses/csegmentid/</guid>
      <description>&lt;p&gt;A Segment is a group of &lt;a href=&#34;https://sillysky.net/docs/nyssr/basics/node/&#34;&gt;Nodes&lt;/a&gt; with the same &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/id/&#34;&gt;ID&lt;/a&gt;. The&#xA;SegmentId has its own class CSegmentId , which is derived from the&#xA;&lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/id/&#34;&gt;IId&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;empty-segmentid&#34;&gt;Empty SegmentId&lt;/h2&gt;&#xA;&lt;p&gt;There is a public &lt;code&gt;EMPTY&lt;/code&gt; field, which is an invalid SegmentId .&lt;/p&gt;&#xA;&lt;h2 id=&#34;constructors&#34;&gt;Constructors&lt;/h2&gt;&#xA;&lt;p&gt;The default constructor creates an invalid SegmentID .&lt;/p&gt;&#xA;&lt;pre class=&#34;ss-javacode&#34;&gt;&lt;code class=&#34;language-java&#34;&gt;public &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/csegmentid/&#34;&gt;CSegmentId&lt;/a&gt;();&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;A SegmentId can be made from a normal &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/id/&#34;&gt;ID&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;pre class=&#34;ss-javacode&#34;&gt;&lt;code class=&#34;language-java&#34;&gt;public &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/csegmentid/&#34;&gt;CSegmentId&lt;/a&gt;(@NotNull final &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/id/&#34;&gt;IId&lt;/a&gt; aId);&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Probably the most used is the constructor, which takes a string.&lt;/p&gt;&#xA;&lt;pre class=&#34;ss-javacode&#34;&gt;&lt;code class=&#34;language-java&#34;&gt;public &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/csegmentid/&#34;&gt;CSegmentId&lt;/a&gt;(@NotNull final String aId);&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;Another constructor converts a UUID into an ID.&lt;/p&gt;</description>
    </item>
    <item>
      <title>CTargetAddress</title>
      <link>https://sillysky.net/docs/nyssr/ids-and-addresses/ctargetaddress/</link>
      <pubDate>Tue, 14 Oct 2025 00:00:00 +0000</pubDate>
      <guid>https://sillysky.net/docs/nyssr/ids-and-addresses/ctargetaddress/</guid>
      <description>&lt;p&gt;The target address is assigned to a &lt;a href=&#34;https://sillysky.net/docs/nyssr/basics/targets/&#34;&gt;target&lt;/a&gt; when it has been&#xA;successfully registered with the &lt;a href=&#34;https://sillysky.net/docs/nyssr/namespaces/targets/itargetregistry/&#34;&gt;target registry&lt;/a&gt;. The target&#xA;address is composed of a &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/tid/&#34;&gt;target ID&lt;/a&gt; (unique for a&#xA;&lt;a href=&#34;https://sillysky.net/docs/nyssr/namespaces/&#34;&gt;namespace&lt;/a&gt;) and the &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/cnamespaceaddress/&#34;&gt;namespace address&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://sillysky.net/images/LigneClaire/doc/IDsAndAddresses.webp&#34; data-alt=&#34;IDs and addresses&#34;&gt;&lt;img class=&#34;uk-align-left&#34; alt=&#34;IDs and addresses&#34; src=&#34;https://sillysky.net/images/LigneClaire/doc/IDsAndAddresses.webp&#34; width=&#34;600&#34;&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;constructors&#34;&gt;Constructors&lt;/h2&gt;&#xA;&lt;p&gt;First follows a constructor with the passing of all four components:&lt;/p&gt;&#xA;&lt;pre class=&#34;ss-javacode&#34;&gt;&lt;code class=&#34;language-java&#34;&gt;public &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/ctargetaddress/&#34;&gt;CTargetAddress&lt;/a&gt;(@NotNull final &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/id/&#34;&gt;IId&lt;/a&gt; aTargetID,&#xA;                      @NotNull final &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/id/&#34;&gt;IId&lt;/a&gt; aNamespaceID,&#xA;                      @NotNull final &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/nodeid/&#34;&gt;CNodeId&lt;/a&gt; aNodeId,&#xA;                      @NotNull final &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/csegmentid/&#34;&gt;CSegmentId&lt;/a&gt; aSegmentId);&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;p&gt;The &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/csegmentid/&#34;&gt;SegmentId&lt;/a&gt; remains empty here. An empty &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/nodeid/&#34;&gt;NodeId&lt;/a&gt; or&#xA;SegmentId is equivalent to specifying a local ID.&lt;/p&gt;</description>
    </item>
    <item>
      <title>IIdFactory</title>
      <link>https://sillysky.net/docs/nyssr/ids-and-addresses/iidfactory/</link>
      <pubDate>Tue, 14 Oct 2025 00:00:00 +0000</pubDate>
      <guid>https://sillysky.net/docs/nyssr/ids-and-addresses/iidfactory/</guid>
      <description>&lt;p&gt;The IIdFactory serves as a factory for classes that implement the&#xA;&lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/id/&#34;&gt;IId&lt;/a&gt; interface. Currently, 4 different IDs are implemented:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the Integer ID for positive integer&lt;/li&gt;&#xA;&lt;li&gt;the String ID&lt;/li&gt;&#xA;&lt;li&gt;the UUID ID&lt;/li&gt;&#xA;&lt;li&gt;the empty ID&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;You can write your own custom &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/id/&#34;&gt;ID&lt;/a&gt; classes.&lt;/p&gt;&#xA;&lt;h2 id=&#34;create-an-id&#34;&gt;Create an ID&lt;/h2&gt;&#xA;&lt;p&gt;The factory must be able to create an &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/id/&#34;&gt;ID&lt;/a&gt; from a Java object:&lt;/p&gt;&#xA;&lt;pre class=&#34;ss-javacode&#34;&gt;&lt;code class=&#34;language-java&#34;&gt;@Nullable &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/id/&#34;&gt;IId&lt;/a&gt; fromObject(@Nullable Object aObj);&lt;/code&gt;&lt;/pre&gt;&#xA;&#xA;&lt;h2 id=&#34;creation-of-a-random-value&#34;&gt;Creation of a random value&lt;/h2&gt;&#xA;&lt;p&gt;The factory should be able to create a random &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/id/&#34;&gt;ID&lt;/a&gt;:&lt;/p&gt;</description>
    </item>
    <item>
      <title>The Namespace ID (NID)</title>
      <link>https://sillysky.net/docs/nyssr/ids-and-addresses/nid/</link>
      <pubDate>Tue, 14 Oct 2025 00:00:00 +0000</pubDate>
      <guid>https://sillysky.net/docs/nyssr/ids-and-addresses/nid/</guid>
      <description>&lt;p&gt;The namespace ID is of type &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/id/&#34;&gt;ID&lt;/a&gt; and unique to a&#xA;&lt;a href=&#34;https://sillysky.net/docs/nyssr/namespaces/inamespace/&#34;&gt;namespace&lt;/a&gt; within a &lt;a href=&#34;https://sillysky.net/docs/nyssr/basics/node/&#34;&gt;node&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-cwellknownnid-class&#34;&gt;The CWellKnownNID class&lt;/h2&gt;&#xA;&lt;p&gt;In the CWellKnownNID class, many namespace IDs are defined that are used by&#xA;supplied plugins.&lt;/p&gt;</description>
    </item>
    <item>
      <title>The Target ID (TID)</title>
      <link>https://sillysky.net/docs/nyssr/ids-and-addresses/tid/</link>
      <pubDate>Tue, 14 Oct 2025 00:00:00 +0000</pubDate>
      <guid>https://sillysky.net/docs/nyssr/ids-and-addresses/tid/</guid>
      <description>&lt;p&gt;Each &lt;a href=&#34;https://sillysky.net/docs/nyssr/namespaces/targets/itarget/&#34;&gt;target&lt;/a&gt; (object that can receive messages) receives an&#xA;&lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/id/&#34;&gt;ID&lt;/a&gt; during &lt;a href=&#34;https://sillysky.net/docs/nyssr/namespaces/targets/itargetregistry/#anchor_register_target&#34;&gt;registration&lt;/a&gt;. The&#xA;target ID (short: &lt;strong&gt;TID&lt;/strong&gt;) is of type &lt;a href=&#34;https://sillysky.net/docs/nyssr/ids-and-addresses/id/&#34;&gt;ID&lt;/a&gt; and is unique for a target&#xA;within a &lt;a href=&#34;https://sillysky.net/docs/nyssr/namespaces/inamespace/&#34;&gt;namespace&lt;/a&gt;. The same TID can exist again in other&#xA;namespaces. This is used when loading multiple instances of apps.&lt;/p&gt;&#xA;&lt;p&gt;If no TID is given when registering the &lt;a href=&#34;https://sillysky.net/docs/nyssr/namespaces/targets/itarget/&#34;&gt;target&lt;/a&gt;, then a &amp;quot;random&amp;quot;&#xA;numeric TID is generated. This is the normal case.&lt;/p&gt;&#xA;&lt;p&gt;If a TID is given, it will be used if no target with this ID has been&#xA;registered in this &lt;a href=&#34;https://sillysky.net/docs/nyssr/namespaces/inamespace/&#34;&gt;namespace&lt;/a&gt; yet.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
