SIFWorks ADK 2.0
Connect Method (provOptions)
NamespacesEdustructures.SifWorksIZoneConnect(ProvisioningFlags)

[This is preliminary documentation and is subject to change.]

Connects the agent with this zone.
Declaration Syntax
C#Visual BasicVisual C++
void Connect(
	ProvisioningFlags provOptions
)
Sub Connect ( _
	provOptions As ProvisioningFlags _
)
void Connect (
	ProvisioningFlags provOptions
)
Parameters
provOptions (ProvisioningFlags)
Remarks
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#
<SIF_Subscribe>
and
CopyC#
<SIF_Provide>
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#
adk.provisioning.batch
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#
getConnectWarnings
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.
Exceptions
ExceptionCondition
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
CopyC#
<SIF_Register>
,
CopyC#
<SIF_Subscribe>
, or
CopyC#
<SIF_Provide>
message as described above
See Also

Assembly: Edustructures.SifWorks.Adk (Module: Edustructures.SifWorks.Adk) Version: 2.0.0.10