Package com.zeroc.Ice

Class Identity

java.lang.Object
com.zeroc.Ice.Identity
All Implemented Interfaces:
Serializable, Cloneable

public final class Identity extends Object implements Cloneable, Serializable
Represents the identity of an Ice object. It is comparable to the path of a URI. Its string representation is name when the category is empty, and category/name when the category is not empty.
See Also:
  • Field Details

    • name

      public String name
      The name of the Ice object. An empty name is not valid.
    • category

      public String category
      The category of the object.
  • Constructor Details

    • Identity

      public Identity()
      Constructs a Identity.
    • Identity

      public Identity(String name, String category)
      Constructs a Identity with values for all its fields.
      Parameters:
      name - The name of the Ice object.
      category - The category of the object.
  • Method Details

    • equals

      public boolean equals(Object rhs)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public Identity clone()
      Overrides:
      clone in class Object
    • ice_writeMembers

      public void ice_writeMembers(OutputStream ostr)
      Marshals this object's fields into an output stream.
      Parameters:
      ostr - the output stream
    • ice_readMembers

      public void ice_readMembers(InputStream istr)
      Unmarshals and sets this object's fields from an input stream.
      Parameters:
      istr - the input stream
    • ice_write

      public static void ice_write(OutputStream ostr, Identity v)
      Marshals an Identity into an output stream.
      Parameters:
      ostr - the output stream
      v - the Identity to marshal; can be null
    • ice_read

      public static Identity ice_read(InputStream istr)
      Unmarshals an Identity from an input stream.
      Parameters:
      istr - the input stream
      Returns:
      the unmarshaled Identity
    • ice_write

      public static void ice_write(OutputStream ostr, int tag, Optional<Identity> v)
      Marshals an optional Identity into an output stream.
      Parameters:
      ostr - the output stream
      tag - the tag
      v - the value to marshal
    • ice_write

      public static void ice_write(OutputStream ostr, int tag, Identity v)
      Marshals an optional Identity into an output stream.
      Parameters:
      ostr - the output stream
      tag - the tag
      v - the value to marshal
    • ice_read

      public static Optional<Identity> ice_read(InputStream istr, int tag)
      Unmarshals an optional Identity from an input stream.
      Parameters:
      istr - the input stream
      tag - the tag
      Returns:
      the unmarshaled value