|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.org.toot.service.ServiceProvider
public abstract class ServiceProvider
An abstract ServiceProvider. Extend this class for specific subject domains.
Constructor Summary | |
---|---|
ServiceProvider(int providerId,
java.lang.String providerName,
java.lang.String description,
java.lang.String version)
Constructs an ServiceProvider with a given
provider name and version identifier. |
Method Summary | |
---|---|
void |
accept(ServiceVisitor v,
java.lang.Class<?> clazz)
Accepts a ServiceVisitor to visit all or specific services. |
java.lang.String |
getDescription(java.util.Locale locale)
Returns a brief, human-readable description of this service provider and its associated implementation. |
int |
getProviderId()
Constructs a blank ServiceProvider . |
java.lang.String |
getProviderName()
Returns the name of the provider responsible for creating this service provider and its associated implementation. |
java.lang.String |
getVersion()
Returns a string describing the version number of this service provider and its associated implementation. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ServiceProvider(int providerId, java.lang.String providerName, java.lang.String description, java.lang.String version)
ServiceProvider
with a given
provider name and version identifier.
providerName
- the provider name.version
- a version identifier.
java.lang.IllegalArgumentException
- if providerName
is null
.
java.lang.IllegalArgumentException
- if version
is null
.Method Detail |
---|
public int getProviderId()
ServiceProvider
. It is up
to the subclass to initialize instance variables and/or
override method implementations in order to ensure that the
getProviderName
and getVersion
methods
will return non-null
values.
public java.lang.String getProviderName()
The default implementation returns the value of the
providerName
instance variable.
null
String
containing
the name of the provider.public java.lang.String getVersion()
The default implementation returns the value of the
version
instance variable.
null
String
containing
the version of this service provider.public java.lang.String getDescription(java.util.Locale locale)
Locale
, if possible.
locale
- a Locale
for which the return value
should be localized.
String
containing a description of this
service provider.public void accept(ServiceVisitor v, java.lang.Class<?> clazz)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |