jason.core
Class ServiceContainerDataModel

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.Vector
                    |
                    +--jason.core.ServiceContainerDataModel
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.util.RandomAccess, java.io.Serializable

public class ServiceContainerDataModel
extends java.util.Vector

Created Fri Sep 06 21:31:49 2002

This is a data model for all service container. This dataModel is available for each Domain.

See Also:
ServiceContainer, Serialized Form

Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
ServiceContainerDataModel()
           
 
Method Summary
 void addServiceContainer(ServiceContainer sc)
          Store a service container
 void addServiceContainerDataModelListener(ServiceContainerDataModelListener listener)
           
 ServiceContainer getServiceContainerAt(int i)
           
 ServiceContainer getServiceContainerForService(Service s)
           
 ServiceContainer getServiceContainerForServiceName(java.lang.String name)
           
 ServiceContext getServiceContextForService(Service s)
           
 ServiceContainer[] getState()
           
 boolean isEnabledServiceOverriding()
           
 void removeServiceContainer(ServiceContainer sc)
          Remove the service container
 int serviceContainerCount()
           
 void setEnabledServiceOverriding(boolean ok)
          Enabled/Disabled the service overriding.
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Constructor Detail

ServiceContainerDataModel

public ServiceContainerDataModel()
Method Detail

addServiceContainerDataModelListener

public void addServiceContainerDataModelListener(ServiceContainerDataModelListener listener)

getServiceContextForService

public ServiceContext getServiceContextForService(Service s)

getServiceContainerForService

public ServiceContainer getServiceContainerForService(Service s)
Returns:
the service container tied to the service s. This method doesn't use the equals method for detecting the good service container

getServiceContainerForServiceName

public ServiceContainer getServiceContainerForServiceName(java.lang.String name)
Returns:
a service container tied to a service s matching the name

getServiceContainerAt

public ServiceContainer getServiceContainerAt(int i)
Returns:
the service container for this index from 0

setEnabledServiceOverriding

public void setEnabledServiceOverriding(boolean ok)
Enabled/Disabled the service overriding. When this property is true, adding a service will take into account if an existing service of the same type exists. Then, the old service will be remove, in such system the last one has always a priority on the old one


isEnabledServiceOverriding

public boolean isEnabledServiceOverriding()

addServiceContainer

public void addServiceContainer(ServiceContainer sc)
Store a service container


removeServiceContainer

public void removeServiceContainer(ServiceContainer sc)
Remove the service container


getState

public ServiceContainer[] getState()
Returns:
a snapshot for available services

serviceContainerCount

public int serviceContainerCount()
Returns:
the number of service container