***  This class provides Binary Compatibility only, not Source Compatibility  ***

com.sas.services.discovery
Class ServiceTypes

com.sas.services.discovery.ServiceTypes
All Implemented Interfaces:
java.io.Serializable

public class ServiceTypes
implements java.io.Serializable

Service capabilities expressed in terms of the Java interface(s) and/or classes.

Since:
1.0
See Also:
Serializable, Serialized Form

Constructor Summary
ServiceTypes()
          Constructs a default instance.
ServiceTypes(java.lang.Class classOrInterface)
          Constructs an instance that specifies a class or interface.
ServiceTypes(java.lang.Class[] classesOrInterfaces)
          Constructs an instance that specifies one or more Java classes used to define a service capability.
 
Method Summary
 void add(java.lang.Class svcCapability)
          Adds a service capability definition.
 boolean areSatisfiedBy(RemoteServiceInterface serviceIf)
          Determines whether or not the service provider satisfies all of the service capabilities.
 void clear()
          Clears all class(es) and interface(es) associated with this service capability definition.
 boolean contains(ServiceTypes requiredClassesOrInterfaces)
          Determines whether or not this service capability definition contains all of the required class/interface service capabilities.
 java.lang.Class[] getClasses()
          Gets the classes and/or interfaces that express the capabilities of a service.
 java.util.Iterator iteratorClasses()
          Gets an iterator of the class and super classes, if any, defining the service capability.
 java.util.Iterator iteratorInterfaces()
          Gets an iterator or the class interfaces that define the service capability.
 void setClass(java.lang.Class classOrInterface)
          Determines the interfaces and classes that define the specified class/interface and appends them to the collections of interfaces and classes.
 void setClasses(java.lang.Class[] classesOrInterfaces)
          Determines the interfaces and classes that define the specified classes and interfaces.
 java.lang.String toString()
          Gets a string representation of this instance.
 

Constructor Detail

ServiceTypes

public ServiceTypes()
Constructs a default instance.


ServiceTypes

public ServiceTypes(java.lang.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 - Class(es) that define one or more service capabilities.

ServiceTypes

public ServiceTypes(java.lang.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 Detail

iteratorClasses

public java.util.Iterator 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 java.util.Iterator 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(java.lang.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(java.lang.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 java.lang.Class[] getClasses()
Gets the classes and/or interfaces that express the capabilities of a service.

Returns:
Classes

clear

public final void clear()
Clears all class(es) and interface(es) associated with this service capability definition.


contains

public boolean contains(ServiceTypes requiredClassesOrInterfaces)
Determines whether or not this service capability definition contains all of the required class/interface service capabilities.

Parameters:
requiredClassesOrInterfaces - Required service capabilities.
Returns:
true if this service capability satisfies all of the required service capabilities.

areSatisfiedBy

public final boolean areSatisfiedBy(RemoteServiceInterface serviceIf)
Determines whether or not the service provider satisfies all of the service capabilities.

Parameters:
serviceIf - An object that implements the RemoteServiceInterface which will be tested to determine if it satisfies all of the specified service capabilities.
Returns:
true if all of the service capabilities are satisfied, false if one or more capabilities aren't satisfied.

add

public void add(java.lang.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 java.lang.String toString()
Gets a string representation of this instance. Intended for debugging purposes.

Overrides:
toString in class java.lang.Object
Returns:
Debug statement describing this instance.

***  This class provides Binary Compatibility only, not Source Compatibility  ***




Copyright © 2009 SAS Institute Inc. All Rights Reserved.