ServerAgent class
Microsoft Office Live Communications Server 2005 with SP1 |
ServerAgent
The ServerAgent class implements a Live Communications server agent.
Applications use ServerAgent objects to interact with the Live Communications Server. Each object of this class represents a logical SIP application to the server. Most applications will create only one such object, but in special cases, it may be necessary to create multiple server agent objects (such as for logging all incoming and all outgoing messages).
Before a ServerAgent object is instantiated, an application manifest should be created to describe the application to the server and provide the message filtering service.
This class implemented the IDisposable interface.
The ServerAgent class is derived from the System.Object class.
Public Constructors
The ServerAgent class has the following public constructors.
Constructor | Description |
---|---|
ServerAgent(ApplicationManifest manifest) | Creates an instance of a ServerAgent object with the specified application manifest. Note This constructor is for script-only applications. |
ServerAgent(Object app, ApplicationManifest manifest) | Creates an instance of a ServerAgent object with the specified dispatch handler object and application manifest. Note This constructor is for applications with a managed code component that handles dispatched messages. |
Public Methods
The ServerAgent class has the following public methods.
Method | Description |
---|---|
CloseHandle | Static (Shared). Closes an open Windows object handle. |
Dispose() | Terminates interaction with the Live Communications Server and releases all resources consumed by this object. |
Equals(Object) | Inherited from System.Object. Determines whether the specified System.Object is equal to the current System.Object. |
GetHashCode() | Inherited from System.Object. Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table. |
GetType() | Inherited from System.Object. Gets the System.Type of the current instance. |
ProcessEvent(Object) | Removes an event from the server queue and processes it. |
ToString() | Inherited from System.Object. Returns a System.String that represents the current System.Object. |
WaitForServerAvailable(Int32) | Static (Shared). Checks to see if the Live Communications Server process has started and initialized. Note Applications should call this method before they create their first ServerAgent object. |
Public Properties
The ServerAgent class has the following public properties.
Property | Description |
---|---|
Pool | Data type: string Access type: Read-only Retrieves the name of the Enterprise Edition pool to which the server belongs. |
ServerProcess | Data type: System.Diagnostics.Process Access type: Read-only Static (Shared). Provides access to the Live Communications Server process. |
WaitHandle | Data type: WaitHandle Access type: Read-only Contains an internal handle used to signal that there is pending input from the Live Communications server that the server agent needs to process. |
Public Events
The ServerAgent class has the following public event.
Event | Description |
---|---|
ConnectionDropped | Occurs when the connection to the server has been dropped. |
Protected Methods
The ServerAgent class has the following protected methods.
Method | Description |
---|---|
CheckDisposed() | Throws ObjectDisposedException if the server agent is in the disposed state. |
Dispose(Boolean) | Destroys this transaction and releases all unmanaged resources as well as optionally releasing all managed ones. |
Finalize() | Provides a finalizer for this ServerAgent instance. |
OnConnectionDropped() | Raises the ServerAgent.ConnectionDropped event with the supplied reason. |
Remarks
Before creating an instance of this class, ServerAgent.WaitForServerAvailable should be called to determine if the Live Communications Server is available.
To terminate interaction with the server, applications should call the Dispose() method.
Requirements
Redistributable: Requires Microsoft Office Live Communications Server 2005 with SP1.
Namespace: Microsoft.Rtc.Sip
Assembly: ServerAgent (in ServerAgent.dll)
See Also
Application Manifests, Creating a SIP Application for Live Communications Server, Registering a SIP Application with Live Communications Server
What did you think of this topic? |
© 2008 Microsoft Corporation. All rights reserved. |