public class Service
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
ServiceRegistry
.Constructor and Description |
---|
Service(java.lang.String name,
TransportType transportType,
int port)
Creates a new instance with the specified protocol name, transport type,
and port number to be bound.
|
Service(java.lang.String name,
TransportType transportType,
java.net.SocketAddress address)
Creates a new instance with the specified protocol name, transport type,
and socket address to be bound.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
boolean |
equals(java.lang.Object o) |
java.net.SocketAddress |
getAddress()
Returns the socket address this service is bound on.
|
java.lang.String |
getName()
Returns the name of this service (protocol).
|
TransportType |
getTransportType()
Returns the transport type this service uses.
|
int |
hashCode() |
java.lang.String |
toString() |
public Service(java.lang.String name, TransportType transportType, int port)
public Service(java.lang.String name, TransportType transportType, java.net.SocketAddress address)
public java.lang.String getName()
public TransportType getTransportType()
public java.net.SocketAddress getAddress()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object