MvEndPoint Class |
Namespace: RW.Server.Component
The MvEndPoint type exposes the following members.
Name | Description | |
---|---|---|
ExecAsyncGlobalCallback |
Callback that executes an asynchronous call to a remote function.
| |
ExecAsyncObjectCallback |
Callback that executes an asynchronous call on a remote object.
| |
ExecSyncGlobalCallback |
Callback that executes a synchronous call to a remote function.
| |
ExecSyncObjectCallback |
Callback that executes a synchronous call on a remote object.
| |
GetServerModel |
Enables the component to receive the object model
specification of the server in asynchronous mode.
| |
LoadViewSpec |
Loads a dynamic view-type specification to the server.
| |
OnConnect |
Called when the connection between the
component and the server is established.
| |
SetIOAdapters |
Sets a message encoder and decoder to the endpoint.
|
Name | Description | |
---|---|---|
Decoder |
Gets the message decoder.
| |
Encoder |
Gets the message encoder.
| |
IsTraced |
Gets a value indicating if a trace system writer is set for this
object.
| |
PeerHost |
Gets the host name of the connected process.
| |
PeerName |
Gets the name of the connected process.
| |
Trace |
Sets or gets the trace system writer for this object.
|
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.
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)
public class XXXRp : RpObject { //... public bool Funcall(long i) { //... } }
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)
public class Funcall { public static bool Execute(long i) { //... } }