org.apache.avalon.phoenix.metainfo
Class ServiceDescriptor
java.lang.Object
|
+--org.apache.avalon.phoenix.metainfo.ServiceDescriptor
- public final class ServiceDescriptor
- extends Object
This class describes the meta info of a service offered by a Block.
Each service is defined by an interface name and the version of that
interface.
- Author:
- Peter Donald
ServiceDescriptor
public ServiceDescriptor(String name,
Version version)
- Construct a service with specified name and version.
- Parameters:
name
- the name of the serviceversion
- the version of service
getVersion
public Version getVersion()
- Return the version of interface
- Returns:
- the version of interface
getName
public String getName()
- Return name of Service (which coresponds to the interface
name eg org.apache.block.WebServer)
- Returns:
- the name of the Service
matches
public boolean matches(ServiceDescriptor other)
- Determine if specified service will match this service.
To match a service has to have same name and must comply with version.
- Parameters:
other
- the other ServiceInfo- Returns:
- true if matches, false otherwise
toString
public String toString()
- Convert to a string of format name/version
- Overrides:
toString
in class Object
- Returns:
- string describing service
Copyright © 2001 Apache Jakarta Project. All Rights Reserved.