|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.elkoserver.foundation.server.metadata.ServiceDesc
public class ServiceDesc
Description of a (possibly) registered service.
| Constructor Summary | |
|---|---|
ServiceDesc(String service,
OptString hostport,
OptString protocol,
OptString label,
AuthDesc auth,
OptString failure,
OptInteger providerID)
JSON-driven constructor. |
|
ServiceDesc(String service,
String failure)
Error constructor. |
|
ServiceDesc(String service,
String hostport,
String protocol,
String label,
AuthDesc auth,
String failure,
int providerID)
Direct constructor. |
|
| Method Summary | |
|---|---|
HostDesc |
asHostDesc(int retryInterval)
Generate a HostDesc object suitable for establishing a connection to the service described by this service descriptor. |
void |
attachLabel(String label)
Set this service's a label string. |
AuthDesc |
auth()
Get this service's authorization configuration. |
JSONLiteral |
encode(EncodeControl control)
Encode this object for transmission or persistence. |
static JSONLiteralArray |
encodeArray(Iterable<ServiceDesc> services)
Generate a JSONLiteralArray of ServiceDesc objects from a sequence of them. |
JSONLiteralArray |
encodeAsArray()
Encode this descriptor as a single-element JSONLiteralArray. |
String |
failure()
Get this descriptor's error message. |
String |
hostport()
Get this service's host:port string. |
String |
label()
Get this service's label string. |
String |
protocol()
Get this service's protocol string. |
int |
providerID()
Get this service's provider ID. |
String |
service()
Get this services's service name. |
void |
setProviderID(int providerID)
Set this service's provider ID. |
ServiceDesc |
subService(String service)
Generate a service descriptor based on this one. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServiceDesc(String service,
String hostport,
String protocol,
String label,
AuthDesc auth,
String failure,
int providerID)
service - The name of the service.hostport - Where to reach the service.protocol - Protocol to speak to the sevice with.label - Printable name for the service.auth - Authorization configuration for connection to the service.failure - Optional error message.providerID - Provider ID, or -1 if not set.
public ServiceDesc(String service,
String failure)
service - The name of the service.failure - Error message.
@JSONMethod(value={"service","hostport","protocol","label","?auth","failure","provider"})
public ServiceDesc(String service,
OptString hostport,
OptString protocol,
OptString label,
AuthDesc auth,
OptString failure,
OptInteger providerID)
service - The name of the service.hostport - Where to reach the service.protocol - Protocol to speak to the service with.label - Optional printable name for the service.auth - Optional authorization configuration for connection.failure - Optional error message.providerID - Optional provider ID.| Method Detail |
|---|
public HostDesc asHostDesc(int retryInterval)
retryInterval - Connection retry interval for connecting to this
host, or -1 to take the default.
public void attachLabel(String label)
label - The new label string for this service.public AuthDesc auth()
public String failure()
public String hostport()
public String label()
public String protocol()
public int providerID()
public String service()
public void setProviderID(int providerID)
providerID - Nominal provider ID number for this service.public ServiceDesc subService(String service)
service - The service name of the sub-service.
public JSONLiteral encode(EncodeControl control)
encode in interface Encodablecontrol - Encode control determining what flavor of encoding
should be done.
public static JSONLiteralArray encodeArray(Iterable<ServiceDesc> services)
public JSONLiteralArray encodeAsArray()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||