org.ros.internal.node.server
Class NodeIdentifier
java.lang.Object
org.ros.internal.node.server.NodeIdentifier
public class NodeIdentifier
- extends java.lang.Object
A node slave identifier which combines the node name of a node with the URI
for contacting the node's XMLRPC server.
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
NodeIdentifier
public NodeIdentifier(GraphName name,
java.net.URI uri)
- Constructs a new
NodeIdentifier
.
Note that either nodeName
or uri
may be null but not both.
This is necessary because either is enough to uniquely identify a
SlaveServer
and because, depending on context, one or the other may
not be available.
Although either value may be null
, we do not treat null
as
a wildcard with respect to equality. Even though it should be safe to do
so, wildcards are unnecessary in this case and would likely lead to buggy
code.
- Parameters:
name
- the GraphName
that the Node
is known asuri
- the URI
of the Node
's SlaveServer
XML-RPC server
forName
public static NodeIdentifier forName(java.lang.String name)
forUri
public static NodeIdentifier forUri(java.lang.String uri)
forNameAndUri
public static NodeIdentifier forNameAndUri(java.lang.String name,
java.lang.String uri)
getName
public GraphName getName()
getUri
public java.net.URI getUri()
toConnectionHeader
public java.util.Map<java.lang.String,java.lang.String> toConnectionHeader()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object