Click or drag to resize
MvEndPoint Class
Base class for any component connected to a dynamic view server (see MvComponent) and for the interface of these components as handled by the server (see C++ class IlsMvComponentItf).
Inheritance Hierarchy

Namespace: RW.Server.Component
Assembly: RW.Server.Component (in RW.Server.Component.dll) Version: 6.3.0.0 (0.8.0.0)
Syntax
public abstract class MvEndPoint

The MvEndPoint type exposes the following members.

Methods
  NameDescription
Public methodExecAsyncGlobalCallback
Callback that executes an asynchronous call to a remote function.
Public methodExecAsyncObjectCallback
Callback that executes an asynchronous call on a remote object.
Public methodExecSyncGlobalCallback
Callback that executes a synchronous call to a remote function.
Public methodExecSyncObjectCallback
Callback that executes a synchronous call on a remote object.
Public methodGetServerModel
Enables the component to receive the object model specification of the server in asynchronous mode.
Public methodLoadViewSpec
Loads a dynamic view-type specification to the server.
Protected methodOnConnect
Called when the connection between the component and the server is established.
Public methodSetIOAdapters
Sets a message encoder and decoder to the endpoint.
Top
Properties
  NameDescription
Public propertyDecoder
Gets the message decoder.
Public propertyEncoder
Gets the message encoder.
Public propertyStatic memberIsTraced
Gets a value indicating if a trace system writer is set for this object.
Public propertyPeerHost
Gets the host name of the connected process.
Public propertyPeerName
Gets the name of the connected process.
Public propertyStatic memberTrace
Sets or gets the trace system writer for this object.
Top
Remarks

Each time a connection is established between a component and a view server, an instance of MvComponent or a derived class is built on the component side and an instance of the C++ class IlsMvComponentItf or a derived class is built on the server side. This means that any connection is handled by an object derived from the C++ class IlsMvEndPoint on the server side, and from MvEndPoint on the client side.

MvEndPoint defines the basic API for interactions between a server and a component. Most of this API is used internally by the component or the server. However, the API for callback functions can be directly accessed from the user's level.

Remarks

Category: Callbacks to member functions

The callback API is used to execute functions on object implemented at the peer endpoint of the connection. The callback execution can be asynchronous, synchronous or duplex. A duplex callback is a pair of symmetric asynchronous calls. The result of the original callback is sent back to the caller as an argument to a second callback.

To avoid deadlock problems related to synchronous calls, it is strongly recommended to keep a fully asynchronous interaction protocol between a component and a server. Thus, you should choose duplex callbacks instead of synchronous callbacks whenever possible.

Unlike in the C++ API, an RpObject methods that can be called by the peer endpoint process does not need to be declared.

Example: Let us suppose you want to define the following function, which should be invoked by the peer endpoint process

bool Funcall(long i)
in a representation object whose type is XXXRp. All you have to do is to implement a member function named funcall as follows in the XXXRp class.
public class XXXRp
    : RpObject
{
//...
    public bool Funcall(long i)
    {
        //...
    }
}
This member function can be invoked from the peer endpoint process by using the callback API.

Category: Callbacks to global functions

This callback API is used to execute global functions at the endpoint of the connection. As callbacks to member functions, global callbacks can be asynchronous, synchronous or duplex. A duplex callback is a pair of symmetric asynchronous calls. See previous section on callbacks to member functions for comments on callback modes.

Global functions do not exist in .NET. However, an equivalent mechanism has been created to ensure compatibility with the C++ version.

Let us suppose you want to define the following global function

bool Funcall(long i)
on the component, that is, a function that could be called from the server using the global callback API. You must define a class whose name is equal to Funcall. This class must implement a static function named Execute whose prototype exactly matches the Funcall method as shown below:
public class Funcall {
    public static bool Execute(long i)
    {
        //...
    }
}

See Also

Reference