|
|
XGConnection.h |
This header file describes the interface to an object which represents the connection between an Xgrid client and an Xgrid controller. The XGConnection class is created by an Xgrid client using the name or address of a controller. The connection can be in one of four states, and a collection of constants is declared which are used describe which state a connection is in. An authenticator can be set on the connector, which allows the connection to be authenticated. A delegate may be set on the connection, and will receive callbacks when connection events occur, prior to the notification of key-value observers.
An XGConnection object represents the connection between an Xgrid client and an Xgrid controller.
The key for the "isClosed" property of XGConnection.
The key for the "isOpened" property of XGConnection.
The key for the "state" property of XGConnection.
XGConnectionKeyIsClosed |
The key for the "isClosed" property of XGConnection.
extern NSString * const XGConnectionKeyIsClosed;
XGConnectionKeyIsOpened |
The key for the "isOpened" property of XGConnection.
extern NSString * const XGConnectionKeyIsOpened;
XGConnectionKeyState |
The key for the "state" property of XGConnection.
extern NSString * const XGConnectionKeyState;
XGConnectionState |
typedef enum { XGConnectionStateClosed, XGConnectionStateOpening, XGConnectionStateOpen, XGConnectionStateClosing } XGConnectionState;
XGConnectionStateClosedThe initial state of the connection.
XGConnectionStateOpeningThe connection enters this state immediately following reception of the -open message.
XGConnectionStateOpenIn this state the connection is open and can be used by XGResource objects to retreive information and perform actions.
XGConnectionStateClosingThe connection enters this state immediately following the reception of the -close message, as well as when it encounters an error.
The XGConnectionState enum defines constants that are used by the connection to specify which state it is in. A connection begins in the Closed state. After receiving the -open message the connection enters the Opening state. If the connection succeeds at opening then the state becomes Open. If the connection fails to open while in the Opening state, or if the connection encounters an error while it is Open, or if the connection receives the -close message, then the state will become Closing, and then Closed.
Last Updated: 2009-08-12