[This is preliminary documentation and is subject to change.]
Connects the agent with this zone.
| C# | Visual Basic | Visual C++ |
void Connect( ProvisioningFlags provOptions )
Sub Connect ( _ provOptions As ProvisioningFlags _ )
void Connect ( ProvisioningFlags provOptions )
- provOptions (ProvisioningFlags)
An agent must connect to a zone in order to perform messaging within the
context of the Adk Class Framework. A typical agent calls this method at
startup for each zone it will connect to, then optionally joins the Zone
with one or more Topics.
The Adk's Provisioning Mode affects the messages sent by this method.
Refer to the AgentProperties class for more information.
The Adk will send
CopyC# and
CopyC#
messages to the zone to provision the SIF Data Objects for which the agent has registered a
Subscriber and Publisher message handlers, respectively.
The
CopyC# agent property (refer to the
AgentProperties class) determines whether the Adk sends a single message
or individual messages for each SIF Data Object. When individual messages
are sent (the default), Category 4 Access Control errors are treated as
warnings. Connect warnings can be retrieved by calling the
CopyC# method. When a single message is sent,
any SIF Error will result in the raising of a SifException.
Note the SIF_Wakeup and SIF_Ping system control messages are sent to
the server upon successful connection.
<SIF_Subscribe>
<SIF_Provide>
adk.provisioning.batch
getConnectWarnings
| Exception | Condition |
|---|---|
| InvalidOperationException | is thrown if this zone is already in
the connected state (i.e. connect has already been called
without a corresponding call to disconnect)
|
| AdkException | is thrown if there is a SIF Error acknowledgement
to a <SIF_Register> <SIF_Subscribe> <SIF_Provide> |