Package com.yahoo.messagebus.network
Class Identity
java.lang.Object
com.yahoo.messagebus.network.Identity
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the hostname for this.Returns the service prefix for this.
-
Constructor Details
-
Identity
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
Implements the copy constructor.- Parameters:
identity
- The object to copy.
-
-
Method Details
-
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
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.
-