public class ServiceDescriptor extends Object implements Serializable, Cloneable
Modifier and Type | Class and Description |
---|---|
static class |
ServiceDescriptor.Protocol
Supported protocols.
|
Modifier and Type | Field and Description |
---|---|
static char |
HOST_SEPARATOR
Separator between host part and interface part in the string representation.
|
static char |
INSTANCE_SEPARATOR
Separator between serviceId and instanceId.
|
static char |
PORT_SEPARATOR
Separator between host and port.
|
static String |
PROTOCOL_SEPARATOR
Separator between protocol part of the descriptor and the rest of the descriptor.
|
static char |
TIMESTAMP_SEPARATOR
Separator between port and startup timestamp.
|
Constructor and Description |
---|
ServiceDescriptor(ServiceDescriptor.Protocol aProtocol,
String aServiceId)
This constructor is used for the lookup.
|
ServiceDescriptor(ServiceDescriptor.Protocol aProtocol,
String aServiceId,
String anInstanceId,
String aHost,
int aPort)
This constructor is used for registration.
|
ServiceDescriptor(ServiceDescriptor.Protocol aProtocol,
String aServiceId,
String anInstanceId,
String aHost,
int aPort,
long aTimestamp) |
Modifier and Type | Method and Description |
---|---|
ServiceDescriptor |
changeServiceId(String aServiceId)
Changes the service id in the descriptor to another id.
|
boolean |
equals(Object o) |
static ServiceDescriptor |
fromRegistrationString(String registrationString)
Factory method to create a service descriptor from a registration string (used for bind in the registry).
|
static ServiceDescriptor |
fromResolveString(String resolveString)
Factory method to create a service descriptor from a resolve string (used for lookup in the registry).
|
static ServiceDescriptor |
fromSystemWideUniqueId(String systemWideUniqueId)
Virtually the same as fromRegistrationString but better named ;-).
|
String |
getGlobalServiceId() |
String |
getHost() |
String |
getInstanceId() |
String |
getLookupString() |
int |
getPort() |
String |
getProtocol() |
String |
getRegistrationString() |
String |
getServiceId() |
String |
getSystemWideUniqueId() |
long |
getTimestamp() |
static String |
getTimeString(long timestamp) |
int |
hashCode() |
static long |
parseTimeString(String s) |
String |
toString() |
public static final String PROTOCOL_SEPARATOR
public static final char HOST_SEPARATOR
public static final char PORT_SEPARATOR
public static final char INSTANCE_SEPARATOR
public static final char TIMESTAMP_SEPARATOR
public ServiceDescriptor(ServiceDescriptor.Protocol aProtocol, String aServiceId, String anInstanceId, String aHost, int aPort)
aProtocol
- aServiceId
- public ServiceDescriptor(ServiceDescriptor.Protocol aProtocol, String aServiceId, String anInstanceId, String aHost, int aPort, long aTimestamp)
public ServiceDescriptor(ServiceDescriptor.Protocol aProtocol, String aServiceId)
aProtocol
- aServiceId
- public String getGlobalServiceId()
public String getRegistrationString()
public String getLookupString()
public final String getSystemWideUniqueId()
public long getTimestamp()
public static final ServiceDescriptor fromSystemWideUniqueId(String systemWideUniqueId)
systemWideUniqueId
- public static final ServiceDescriptor fromRegistrationString(String registrationString)
registrationString
- public static final ServiceDescriptor fromResolveString(String resolveString)
resolveString
- public ServiceDescriptor changeServiceId(String aServiceId)
serviceId
- target service id.public String getHost()
public int getPort()
public String getProtocol()
public String getServiceId()
public String getInstanceId()
public static String getTimeString(long timestamp)
public static long parseTimeString(String s)
Copyright © 2010-2014 anotheria.net. All Rights Reserved.