|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.etools.iseries.remotebuild.RBResourceContext
public class RBResourceContext
An RBResourceContext provides a means of caching references to RBResources by their model resource. The RBResource hierarchy uses this to ensure that the resources that are located through a context preserve object identity. If an RBResourceContext is not used, then, for example, the RBProject returned by two successive calls to getProject() on the same resource will return different object instances for the RBProject. If the resource has an associated RBResourceContext, then these two results will be the same instance.
An operation that takes a selection of AbstractISeriesResources and creates RBResources from them should establish a context at the beginning of the operation, use it for resolution, and then discard it at the end of the operation.
Constructor Summary | |
---|---|
RBResourceContext()
|
Method Summary | |
---|---|
void |
add(RBResource resource)
Adds a new resource to the context. |
RBResource |
get(AbstractISeriesResource modelResource)
Retrieves an RBResource from a context, given the model resource. |
void |
remove(RBResource resource)
Removes a resource from the context. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RBResourceContext()
Method Detail |
---|
public void add(RBResource resource)
resource
- the resource to be addedpublic void remove(RBResource resource)
resource
- the resource to be removedpublic RBResource get(AbstractISeriesResource modelResource)
null
if there is no associated model resource.
resource
- the model resource associated with the RBResource.
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |