|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.livetribe.slp.ServiceType
public class ServiceType
Services that offer the same functionalities are characterized by the same ServiceType
.
The ServiceType
forms the initial part of a ServiceURL
, and it is used to both
characterize the service and to be used to lookup services that offer particular functionalities.
ServiceType
s are represented in this form:
[service:][<abstract-type>:]<concrete-type>[.<naming-authority>]The
service:
string can be omitted, though it is normally used to identify service types
exposed by SLP.
abstract-type
denotes a type name for a service that can be exposed over a number of
different protocols. For example, JMX exposes connector servers (the services) over different
protocols, and their service type can be service:jmx:rmi
or service:jmx:jmxmp
,
where rmi
and jmxmp
are the protocols used for the wire communication.
concrete-type
denotes a type name for the protocol used by the service to expose its
functionalities.
naming-authority
denotes the name of an organization that defined the service type.
ServiceURL
,
Serialized FormConstructor Summary | |
---|---|
ServiceType(String type)
Creates a ServiceType parsing the given string. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
String |
getAbstractTypeName()
Returns the abstract type name of this service type. |
String |
getConcreteTypeName()
Returns the concrete type name of this service type. |
String |
getNamingAuthority()
Returns the naming authority of this service type. |
String |
getPrincipleTypeName()
Returns the protocol type name of this service type. |
int |
hashCode()
|
boolean |
isAbstractType()
Returns true if this service type is of the form [service:]abstract:concrete . |
boolean |
isNADefault()
Returns true if this service type does not specify a naming authority. |
boolean |
isServiceURL()
Returns true if this service type begins with the string service: . |
boolean |
matches(ServiceType serviceType)
Returns true if this service type matches the given service type, false otherwise. |
String |
toString()
Returns the string form of this service type, that can be passed to ServiceType(String) to be parsed. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ServiceType(String type)
ServiceType
parsing the given string.
type
- The string to be parsedMethod Detail |
---|
public boolean isServiceURL()
service:
.
public boolean isAbstractType()
[service:]abstract:concrete
.
public boolean isNADefault()
public String getConcreteTypeName()
[service:]foo:bar
returns bar
.
For service types of the form [service:]foo
returns the empty string.
public String getPrincipleTypeName()
[service:]foo:bar
returns foo
.
For service types of the form [service:]foo
returns foo
.
public String getAbstractTypeName()
[service:]foo:bar
returns [service:]foo
.
For service types of the form [service:]foo
returns the empty string.
public String getNamingAuthority()
[service:]foo:bar.baz
returns baz
.
For service types of the form [service:]foo.baz
returns baz
.
For service types of the form [service:][foo:]bar
returns the empty string.
public boolean matches(ServiceType serviceType)
service:
prefix is not influent in matching, so
service:foo:bar
matches foo:bar
.
service:foo
matches service:foo:bar
, foo:bar
and foo
.
serviceType
- The service type to match againstpublic boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
ServiceType(String)
to be parsed.
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |