Objects, object models, and object access interfaces
There are three basic types of structures in the WorldServer SDK: objects, object managers, and object interfaces. You can use these structures to access exposed WorldServer services and data.
In short, you create an application called a custom access module. This module uses object interfaces to access and interact with objects and it uses object managers to perform processes related to WorldServer. The custom access method is executed in the service framework.
Objects
By using SDK objects, you can access WorldServer services and data. SDK objects are wrappers for core objects and services and can interact directly with an installed WorldServer environment. You can invoke services and manipulate data through instances of these objects.
SDK objects are not exposed directly to developers using the SDK. You cannot explicitly create or initialize SDK objects; 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.
There are various types of SDK objects within the SDK, which are typically aligned with global WorldServer constructs. For example, there is a TM SDK object through which data services for a specific TM are available.
The SDK object is initialized based on the information that you provide. For example, you need to specify the name of the TM or the TM group that 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. Usually, 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 preferred instance of an SDK object. The instance will be configured based on the request information. For all object manager factory methods, you need to provide enough information to identify the corresponding WorldServer entity.
As with SDK objects, you cannot create or initialize object managers explicitly. Also, you cannot share them as static objects, due to their dynamic nature. You must access them within a specific WorldServer context. Within the SDK, you can access all object managers (with the exception of WSContextManager) through the WSContext object. Before that, you need to obtain a handle to a WSContext object and use it to request the object manager of your choice. You can access and manipulate the object manager via its corresponding user interface.
You can use the object manager instance 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 managers and SDK object instances associated with it are no longer valid.
WSContextManager is the only object manager that does not require a factory lookup. It exists as a static class and it is part of the service framework.
Object access interfaces
The SDK contains a collection of interfaces that describe all the features you can use. These interfaces are aligned with the object managers and with the SDK objects, allowing 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 services to create 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 needed 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.
Unless explicitly documented otherwise, you should consider all SDK interfaces as object access interfaces. To ensure compatibility with WorldServer, you must not extend or inherit from these interfaces.