Documentation Center

SDK Objects

SDK objects allow you to access WorldServer services and data. They are wrappers for core objects and services and are able to interact directly with the installed WorldServer environment. You can invoke services and manipulate data via instances of these objects.

SDK objects are not exposed directly to developers using the SDK, and thus cannot be explicitly created or initialized. Instead, you must request a specific type and instance of an SDK object from the appropriate object manager. Object interfaces provide you with a handle for manipulating a given type of SDK object. Within the SDK, there are various types of SDK objects, which typically are aligned with global WorldServer constructs. For example, there is a TM SDK object through which data and services for a specific TM are available.

The SDK object is initialized based on the information that you provide. For instance, you must specify the name of which TM or TM group you want to access.

Object Managers

Object managers provide factory-like services for acquiring and managing service modules. They also provide services that cannot be generalized to a specific object instance. In general, the object managers provide lookup, creation, and deletion services for SDK objects. To obtain an instance of an SDK object, you must first obtain a handle to the appropriate object manager, and then use it to retrieve the desired instance of an SDK object. The instance will be configured based on the request information. All object manager factory methods require that you provide sufficient information for identifying the corresponding WorldServer entity.

As with SDK objects, object managers cannot be explicitly created or initialized. Due to their dynamic nature, they also cannot be shared as static objects. They must be accessed within a specific WorldServer context. Within the SDK, all object managers (with the exception of WSContextManager) are accessible via the WSContext object. You must first obtain a handle to a WSContext object, and use it to request the desired object manager. The object manager can be accessed and manipulated via the corresponding object interface.

The object manager instance is usable as long as the WSContext instance from which it was created is still active. Similarly, the SDK objects are linked to the same WSContext instance as the object manager through which they were created. If the WSContext object becomes inactive, all object manager and SDK object instances associated with it are no longer valid. (Attempting to use them will result in errors.)

The WSContextManager is the only object manager that does not require a factory lookup. It exists as a static class, and is a part of the service framework (see the Services Framework topic).

Object Access Interfaces

The SDK contains a collection of interfaces that describe all the functionality available for your use. These interfaces are aligned with the object managers and SDK objects, and allow you to define object handles for manipulating instances of both object managers and SDK objects.

The SDK does not support the use (or implementation) of these interfaces for the purpose of creating new classes or interfaces in custom code. These interfaces provide handles to internally-created objects that you cannot explicitly create or extend, and only the behavior necessary for external manipulation is exposed. Note that the actual instances of object managers and SDK objects contain behavior that is not exposed to you, but is required by the SDK for internal processing. These interfaces may be extended in future releases.

All SDK interfaces should be considered as object access interfaces unless explicitly documented otherwise. To ensure compatibility with WorldServer, extending or inheriting from these interfaces is explicitly prohibited.