*** This class provides Binary Compatibility only, not Source Compatibility ***
Package com.sas.services.discovery
Class Services
java.lang.Object
com.sas.services.discovery.Services
- All Implemented Interfaces:
Serializable
@SASScope("ALL")
@BinaryCompatibilityOnly
public class Services
extends Object
implements Serializable
A type-safe collection of services which implement the
RemoteServiceInterface interface.- Since:
- 1.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanadd(RemoteServiceInterface service) Adds aRemoteServiceInterfaceobject to this collection.final booleanadd(Object object) Adds aRemoteServiceInterfaceobject to this collection.final booleanAdds all of the services to this collection.final Collection<RemoteServiceInterface> Gets the collection of services.final Iterator<RemoteServiceInterface> iterator()Gets an iterator for the services.final booleanremove(RemoteServiceInterface service) Removes aRemoteServiceInterfaceobject from this collection.final booleanRemoves all of the services from this collection.final voidsetCollection(Collection<RemoteServiceInterface> collection) Gets the collection of services.final intsize()Gets the number of services in the collection.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Services
public Services()Default constructor that initializes this collection with no services. -
Services
Constructor that initializes this collection with the specified services.- Parameters:
services- Services to add to this collection.- Throws:
IllegalArgumentException- if anullservices parameter is specified.
-
-
Method Details
-
add
public final boolean add(Object object) Adds aRemoteServiceInterfaceobject to this collection. If the object already exists in this collection, then the collection is not updated. Anullparameter is also disregarded.- Parameters:
object- An implementation of aRemoteServiceInterface.- Returns:
trueif the service was added orfalseif it wasn't.
-
add
Adds aRemoteServiceInterfaceobject to this collection. If the object already exists in this collection, then the collection is not updated. Anullparameter is also disregarded.- Parameters:
service- An implementation of aRemoteServiceInterface.- Returns:
trueif the service was added orfalseif it wasn't.
-
remove
Removes aRemoteServiceInterfaceobject from this collection.- Parameters:
service- An implementation of aRemoteServiceInterface.- Returns:
trueif the collection contained the item to be removed.
-
addAll
Adds all of the services to this collection.- Parameters:
services- Collection of services to add to this collection.- Returns:
trueif this collection was altered,falseif it wasn't.
-
removeAll
Removes all of the services from this collection.- Parameters:
services- Collection of services to remove from this collection.- Returns:
trueif this collection was altered,falseif it wasn't.
-
getCollection
Gets the collection of services.- Returns:
- Service collection.
-
setCollection
Gets the collection of services.- Parameters:
collection- Service collection. Each element must implement the base service interfaceRemoteServiceInterface.
-
iterator
Gets an iterator for the services.- Returns:
- Iterator for a copy of the set of services.
-
size
public final int size()Gets the number of services in the collection.- Returns:
- Number of services in the collection.
-