*** This class provides Binary Compatibility only, not Source Compatibility ***
Package com.sas.services.discovery
Class ServiceTypes
java.lang.Object
com.sas.services.discovery.ServiceTypes
- All Implemented Interfaces:
Serializable
@SASScope("ALL")
@BinaryCompatibilityOnly
public class ServiceTypes
extends Object
implements Serializable
Service capabilities expressed in terms of the Java interface(s) and/or
classes.
- Since:
- 1.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a default instance.ServiceTypes(Class classOrInterface) Constructs an instance that specifies a class or interface.ServiceTypes(Class[] classesOrInterfaces) Constructs an instance that specifies one or more Java classes used to define a service capability. -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(Class svcCapability) Adds a service capability definition.final booleanareSatisfiedBy(RemoteServiceInterface serviceIf) Determines whether or not the service provider satisfies all of the service capabilities.final voidclear()Clears all classes and interface classes associated with this service capability definition.booleancontains(ServiceTypes requiredClassesOrInterfaces) Determines whether or not this service capability definition contains all of the required class/interface service capabilities.final Class[]Gets the classes and/or interfaces that express the capabilities of a service.Iterator<Class> Gets an iterator of the class and super classes, if any, defining the service capability.Iterator<Class> Gets an iterator or the class interfaces that define the service capability.final voidsetClass(Class classOrInterface) Determines the interfaces and classes that define the specified class/interface and appends them to the collections of interfaces and classes.final voidsetClasses(Class[] classesOrInterfaces) Determines the interfaces and classes that define the specified classes and interfaces.final StringtoString()Gets a string representation of this instance.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
ServiceTypes
public ServiceTypes()Constructs a default instance. -
ServiceTypes
public ServiceTypes(Class[] classesOrInterfaces) Constructs an instance that specifies one or more Java classes used to define a service capability. The class should either be an interface that a desired service implements or the class or superclass of the desired service.- Parameters:
classesOrInterfaces- Classes that define one or more service capabilities.
-
ServiceTypes
public ServiceTypes(Class classOrInterface) Constructs an instance that specifies a class or interface. The class should either be an interface that a desired service implements or the class or superclass of the desired service.- Parameters:
classOrInterface- A class that defines a service capability.
-
-
Method Details
-
iteratorClasses
public Iterator<Class> iteratorClasses()Gets an iterator of the class and super classes, if any, defining the service capability.- Returns:
- Iterator of classes defining the service capability's
class inheritance structure. The iterator element is of
type
Class.
-
iteratorInterfaces
public Iterator<Class> iteratorInterfaces()Gets an iterator or the class interfaces that define the service capability.- Returns:
- Iterator of classes defining the service capability's
implemented interfaces. The iterator element is of type
Class.
-
setClass
public final void setClass(Class classOrInterface) Determines the interfaces and classes that define the specified class/interface and appends them to the collections of interfaces and classes. Use the clear() method prior to invoking this method if its desired to replace any previously specified elements.- Parameters:
classOrInterface- A class that defines a service capability.
-
setClasses
public final void setClasses(Class[] classesOrInterfaces) Determines the interfaces and classes that define the specified classes and interfaces.- Parameters:
classesOrInterfaces- Classes that define one or more service capabilities.
-
getClasses
public final Class[] getClasses()Gets the classes and/or interfaces that express the capabilities of a service.- Returns:
- Classes
-
clear
public final void clear()Clears all classes and interface classes associated with this service capability definition. -
contains
Determines whether or not this service capability definition contains all of the required class/interface service capabilities.- Parameters:
requiredClassesOrInterfaces- Required service capabilities.- Returns:
trueif this service capability satisfies all of the required service capabilities.
-
areSatisfiedBy
Determines whether or not the service provider satisfies all of the service capabilities.- Parameters:
serviceIf- An object that implements theRemoteServiceInterfacewhich will be tested to determine if it satisfies all of the specified service capabilities.- Returns:
trueif all of the service capabilities are satisfied,falseif one or more capabilities aren't satisfied.
-
add
public void add(Class svcCapability) Adds a service capability definition.- Parameters:
svcCapability- A Class defining a service capability to add to the overall service capability definition.
-
toString
public final String toString()Gets a string representation of this instance. Intended for debugging purposes.- Overrides:
toStringin classObject- Returns:
- Debug statement describing this instance.
-