Class Identity

java.lang.Object
com.yahoo.messagebus.network.Identity

public class Identity extends Object
This class encapsulates the identity of the application that uses this instance of message bus. This identity contains a servicePrefix identifier, which is the configuration id of the current servicePrefix, and the canonical host name of the host running this.
Author:
Simon Thoresen Hult
  • Constructor Details

    • Identity

      public Identity(String configId)
      The default constructor requires a configuration identifier that it will use to subscribe to this message bus' identity. This identity is necessary so that the network layer is able to identify self for registration with Slobrok.
      Parameters:
      configId - The config identifier for the application.
    • Identity

      public Identity(Identity identity)
      Implements the copy constructor.
      Parameters:
      identity - The object to copy.
  • Method Details

    • getHostname

      public String getHostname()
      Returns the hostname for this. This is the network name of the host on which this identity exists. It is retrieved on creation by running shell command "hostname".
      Returns:
      The canonical host name.
    • getServicePrefix

      public String getServicePrefix()
      Returns the service prefix for this. This is what is prefixed to every session that is created on this identity's message bus before registered in the naming service.
      Returns:
      The service prefix.