Package com.yahoo.messagebus.network.rpc
Class RPCServiceAddress
- java.lang.Object
-
- com.yahoo.messagebus.network.rpc.RPCServiceAddress
-
- All Implemented Interfaces:
ServiceAddress
public class RPCServiceAddress extends java.lang.Object implements ServiceAddress
Implements theServiceAddress
interface for the RPC network.- Author:
- Haavard Pettersen
-
-
Constructor Summary
Constructors Constructor Description RPCServiceAddress(java.lang.String serviceName, com.yahoo.jrt.Spec connectionSpec)
Constructs a service address from the given specifications.RPCServiceAddress(java.lang.String serviceName, java.lang.String connectionSpec)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
com.yahoo.jrt.Spec
getConnectionSpec()
Returns the connection spec for the remote service.java.lang.String
getServiceName()
Returns the name of the remove service.java.lang.String
getSessionName()
Returns the name of the remote session.RPCTarget
getTarget()
Returns the RPC target to be used when communicating with the remove service.int
hashCode()
boolean
isMalformed()
Returns whether or not this service address is malformed.void
setTarget(RPCTarget target)
Sets the RPC target to be used when communicating with the remote service.
-
-
-
Constructor Detail
-
RPCServiceAddress
public RPCServiceAddress(java.lang.String serviceName, com.yahoo.jrt.Spec connectionSpec)
Constructs a service address from the given specifications. The last component of the service is stored as the session name.- Parameters:
serviceName
- The full service name of the address.connectionSpec
- The connection specification.
-
RPCServiceAddress
public RPCServiceAddress(java.lang.String serviceName, java.lang.String connectionSpec)
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
isMalformed
public boolean isMalformed()
Returns whether or not this service address is malformed.- Returns:
- True if malformed.
-
getServiceName
public java.lang.String getServiceName()
Returns the name of the remove service.- Returns:
- The service name.
-
getSessionName
public java.lang.String getSessionName()
Returns the name of the remote session.- Returns:
- The session name.
-
getConnectionSpec
public com.yahoo.jrt.Spec getConnectionSpec()
Returns the connection spec for the remote service.- Returns:
- The connection spec.
-
setTarget
public void setTarget(RPCTarget target)
Sets the RPC target to be used when communicating with the remote service.- Parameters:
target
- The target to set.
-
getTarget
public RPCTarget getTarget()
Returns the RPC target to be used when communicating with the remove service.- Returns:
- The target to use.
-
-