|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TopicFactory
Creates Topic objects and provides access to the topics that have been created during this session of the agent.
Agents exchange data with SIF zones via Zone and Topic objects, which can
be obtained with the ZoneFactory and TopicFactory classes. These factories
are available by calling the Agent.getZoneFactory and
Agent.getTopicFactory methods.
Topics are used to aggregate publish, subscribe, and query activity from multiple zones. An Agent may have only one Topic instance per SIF Data Object type (e.g. "StudentPersonal", "BusInfo", or "LibraryPatronStatus"), but a Topic can be joined with any number of Zones.
Topic instances are returned by calling the getInstance method, which returns the same Topic object for a given object type. Topic instances are cached by the factory. getAllTopics returns all topics in the cache. A Topic remains in the cache for as long as the agent is running.
| Method Summary | |
|---|---|
java.util.Collection<SIFContext> |
getAllSupportedContexts()
Gets all SIF Contexts that have topics created for them |
java.util.Collection<Topic> |
getAllTopics(SIFContext context)
Gets all Topic instances in the factory cache for the specified context |
Topic |
getInstance(ElementDef objectType)
Gets a Topic instance within the default SIF Context for a SIF object type. |
Topic |
getInstance(ElementDef objectType,
SIFContext context)
Gets a Topic instance for a SIF object type. |
Topic |
lookupInstance(ElementDef objectType,
SIFContext context)
Looks up an existing Topic withing the given SIFContext for the given object type. |
| Method Detail |
|---|
Topic getInstance(ElementDef objectType)
objectType - The ElementDef identifying a top-level SIF Data Object
defined by the SIFDTD class (e.g. ADK.DTD().STUDENTPERSONAL)
java.lang.IllegalArgumentException - is thrown if the object type is not
a root-level object for the version of SIF in use by the agent
Topic getInstance(ElementDef objectType,
SIFContext context)
objectType - The ElementDef identifying a top-level SIF Data Object
defined by the SIFDTD class (e.g. ADK.DTD().STUDENTPERSONAL)context - Lookup a Topic instance for the given SIF Context
java.lang.IllegalArgumentException - is thrown if the object type is not
a root-level object for the version of SIF in use by the agent
Topic lookupInstance(ElementDef objectType,
SIFContext context)
objectType - The ElementDef identifying the top-level SIF Data Objectcontext - The SIF Context to look in
java.util.Collection<Topic> getAllTopics(SIFContext context)
context - A SIFContext to return all topics for
java.util.Collection<SIFContext> getAllSupportedContexts()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||