|
copyright The Portico Project 2008. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.portico.lrc.LRCInstanceRepository
public class LRCInstanceRepository
This class is the central location to store object instance information. Instance information is
stored as a set of OCInstance
objects and contains the handle and discovered class of
the instance for the federate associated with it etc...
Field Summary | |
---|---|
private Map<Integer,Integer> |
disctypes
|
private Map<Integer,OCInstance> |
instances
|
private LRCState |
state
|
Constructor Summary | |
---|---|
LRCInstanceRepository(LRCState state)
Create a new instance repository that is to reside within the given LRCState |
Method Summary | |
---|---|
OCInstance |
addInstance(OCInstance instance,
int discoveredType)
Adds the given instance to the repository. |
boolean |
containsInstance(int handle)
Returns true if this repository contains an instance with the given handle, false otherwise |
Integer |
getDiscoveredType(int handle)
Returns the handle of the class the instance was discovered as |
OCInstance |
getInstance(int handle)
Gets the instance of the given handle from this repository and returns it. |
OCInstance |
getInstance(String name)
Get the instance with the given name. |
boolean |
ownsAnyAttributes()
Returns true if the federate represented by the LRC this repository is a part of owns any attributes stored within (currently only checks for owned instances as attribute-level ownership is not supported by Portico yet). |
OCInstance |
removeInstance(int handle)
Removes and returns the instance with the given handle from the repository. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Map<Integer,OCInstance> instances
private Map<Integer,Integer> disctypes
private LRCState state
Constructor Detail |
---|
public LRCInstanceRepository(LRCState state)
LRCState
Method Detail |
---|
public OCInstance addInstance(OCInstance instance, int discoveredType)
instance
- The instance being discovereddiscoveredType
- The class handle of the type the instance is being discovered aspublic OCInstance getInstance(int handle)
public OCInstance getInstance(String name)
public OCInstance removeInstance(int handle)
public Integer getDiscoveredType(int handle)
handle
- The handle of the instance to find the discovered class for
public boolean containsInstance(int handle)
public boolean ownsAnyAttributes()
|
copyright The Portico Project 2008. | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |