XGConnection.h

Includes:
<Foundation/Foundation.h>

Overview

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.



Classes

XGConnection

An XGConnection object represents the connection between an Xgrid client and an Xgrid controller.

Categories

NSObject(XGConnectionDelegate)


Constants

XGConnectionKeyIsClosed

The key for the "isClosed" property of XGConnection.

XGConnectionKeyIsOpened

The key for the "isOpened" property of XGConnection.

XGConnectionKeyState

The key for the "state" property of XGConnection.


XGConnectionKeyIsClosed


The key for the "isClosed" property of XGConnection.

extern NSString * const XGConnectionKeyIsClosed ;  
Availability
Introduced in OS X v10.4, but later deprecated in OS X v10.7. Not available in iOS.

XGConnectionKeyIsOpened


The key for the "isOpened" property of XGConnection.

extern NSString * const XGConnectionKeyIsOpened ;  
Availability
Introduced in OS X v10.4, but later deprecated in OS X v10.7. Not available in iOS.

XGConnectionKeyState


The key for the "state" property of XGConnection.

extern NSString * const XGConnectionKeyState ;  
Availability
Introduced in OS X v10.4, but later deprecated in OS X v10.7. Not available in iOS.

Typedefs

XGConnectionState

XGConnectionState


Constants
XGConnectionStateClosed

The initial state of the connection.

XGConnectionStateOpening

The connection enters this state immediately following reception of the -open message.

XGConnectionStateOpen

In this state the connection is open and can be used by XGResource objects to retreive information and perform actions.

XGConnectionStateClosing

The connection enters this state immediately following the reception of the -close message, as well as when it encounters an error.

Discussion

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.

Availability
Introduced in OS X v10.4, but later deprecated in OS X v10.7. Not available in iOS.

 

Did this document help you? Yes It's good, but... Not helpful...