|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ZoneFactory
Creates Zone objects and provides access to the Zones created by an 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.
An Agent may have one Zone object per SIF zone to which it is connected.
Zone instances are returned by calling the getInstance method. When no properties are specified for a zone, the agent's defaults are used. Default properties are returned by the Agent.getProperties method. For a explanation of the various properties that affect zones, refer to the AgentProperties class description.
The getInstance method returns the same Zone object for a given zone identifier for as long as it remains in the factory's cache. getAllZones returns all zones in the cache. A Zone remains in the cache until its disconnect method is called, at which point it is removed and can no longer be used by agent. (Calling the Zone.connect method on a disconnected zone throws an exception.) To reconnect to a zone after calling its disconnect method, obtain a fresh Zone instance from the ZoneFactory.
| Method Summary | |
|---|---|
Zone[] |
getAllZones()
Gets all zones in the factory cache |
Zone |
getInstance(java.lang.String zoneId,
java.lang.String zoneUrl)
Gets a Zone instance with default properties |
Zone |
getInstance(java.lang.String zoneId,
java.lang.String zoneUrl,
AgentProperties props)
Gets a Zone instance with custom properties |
Zone |
getZone(java.lang.String zoneId)
Gets a Zone previously created by a call to getInstance |
void |
removeZone(Zone zone)
Remove a zone from the ZoneFactory |
| Method Detail |
|---|
Zone getInstance(java.lang.String zoneId,
java.lang.String zoneUrl)
throws ADKException
zoneId - The zone identifierzoneUrl - The URL of the Zone Integration Server that manages this
zone. The format of the URL is specific to the ZIS product and the
transport protocol used to communicate with the ZIS
ADKException
Zone getInstance(java.lang.String zoneId,
java.lang.String zoneUrl,
AgentProperties props)
throws ADKException
zoneId - The zone identifierzoneUrl - The URL of the Zone Integration Server that manages this
zone. The format of the URL is specific to the ZIS product and the
transport protocol used to communicate with the ZISprops - Properties for the factory to use when creating a new Zone
object
ADKExceptionZone getZone(java.lang.String zoneId)
zoneId - The zone identifier
Zone[] getAllZones()
void removeZone(Zone zone)
This method can only be called on a zone that is in the disconnected state.
zone - The zone to remove
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||