Click or drag to resize
MvComponent Class
An MvComponent lets you open dynamic views.
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 class MvComponent : MvEndPoint, 
	IRtModelBuilder, IDisposable

The MvComponent type exposes the following members.

Constructors
  NameDescription
Protected methodMvComponent
Initializes a new MvComponent instance.
Top
Methods
  NameDescription
Protected methodAckOpenView
Called by Rogue Wave Server in order to acknowledge or rollback a view opening performed with the "acknoledged openView" method.
Public methodBeginC2STransaction
Initializes a component-to-server transaction.
Public methodBeginC2STransaction(MvComponentTransactionHandler)
Initializes a component-to-server transaction.
Public methodBeginModelDeclaration
Empty implementation of IRtModelBuilder.
Protected methodBeginS2CTransaction
Transaction Control from the Server to the Component. Called whenever a server-to-component transaction is opened.
Public methodCommitC2STransaction
Sends to the server the current component-to-server transaction.
Public methodStatic memberConnect
Lets you establish a connection with a the server identified by its name and hostname.
Public methodDeclAttribute
Empty implementation of IRtModelBuilder.
Public methodDeclClass
Empty implementation of IRtModelBuilder.
Public methodDeclFunction
Empty implementation of IRtModelBuilder.
Public methodDeclParentClass
Implementation of IRtModelBuilder.
Public methodDeclRelation
Empty implementation of IRtModelBuilder.
Public methodDelRepresentation
Called by Rogue Wave Server to delete a representation.
Public methodDisconnect
Disconnects the component from the server.
Public methodEndModelDeclaration
Empty implementation of IRtModelBuilder.
Protected methodEndS2CTransaction
Transaction Control from the Server to the Component. Called whenever a server-to-component transaction is over.
Public methodExecAsyncGlobalCallback
Callback that executes an asynchronous call to a remote function.
(Inherited from MvEndPoint.)
Public methodExecAsyncObjectCallback
Callback that executes an asynchronous call on a remote object.
(Inherited from MvEndPoint.)
Public methodCode exampleExecDuplexGlobalCallbackAsync
This function executes a global callback on the server and get its result in an asynchronous task.
Public methodCode exampleExecDuplexObjectCallbackAsync
This function executes a member callback on the server and get its result in an asynchronous task.
Public methodExecSyncGlobalCallback
Callback that executes a synchronous call to a remote function.
(Inherited from MvEndPoint.)
Public methodExecSyncObjectCallback
Callback that executes a synchronous call on a remote object.
(Inherited from MvEndPoint.)
Public methodExecUserAsyncCallback
Component Actions on the Server. Executes the callback function callbackName for the user object which is associated with the component on the server side. (The user object type should be a subtype of IlsMvUser.)
Public methodExit
Called when the component is destroyed.
Public methodGetObjectIdsAsync
Requests the list of objects that have been registered with the server and whose names match the pattern. (See IlsString::match(), see also IlsMvServer::DeclObjectLabel() to know how to associate a Server object with a label.)
Public methodGetRepresentation
Given an identifier, this method returns the associated representation, if any.
Public methodGetRpModel
Model Management. Returns the dynamic representation model identified by id, if any, or null otherwise.
Public methodGetRpObject
Returns the RpObject from a given MvRef.
Public methodGetServerModel(Boolean)
Enables the component to receive the object model specification of the server in asynchronous mode.
(Overrides MvEndPointGetServerModel(Boolean).)
Public methodGetServerModel(IRtModelBuilder, Boolean)
Request the server for the server model description.
Public methodGetViewIdsAsync
Requests from the server the list of the views that meet the criteria defined by the arguments.
Public methodGetViewTypesAsync
Queries the list of views available on a given object, according to some patterns.
Public methodLoadViewSpec
Loads a dynamic view-type specification to the server.
(Inherited from MvEndPoint.)
Public methodNewInCollector(RpObject, Int32, Boolean)
Lets you create a new representation object associated with a collector attribute.

On the server side, this new representation object will be associated with a new Server object, which itself will be included in the relation specified by the collector.

The method determines the representation object type associated with the collector in the view specification. It calls the constructor of this object type and calls the function OnAddToCollection(RpObject, Int32) with collectorOwner and collectorId as parameters on the new object.

Then, if the endUpdate is true, the method EndC2SUpdate is invoked.

Public methodNewInCollector(RpObjModel, RpObject, Int32, Boolean)
Lets you create a new representation object associated with a collector attribute.

On the server side, this new representation object will be associated with a new Server object, which itself will be included in the relation specified by the collector.

The method calls the constructor for the objModel type and calls the function OnAddToCollection(RpObject, Int32) with collectorOwner and collectorId as parameters on the new object.

Then, if the endUpdate is true, the method EndC2SUpdate is invoked.

Public methodNewMapping
Enables the component to create a new representation object associated with a collector attribute.
Public methodNewRepresentation
Called to create a new representation if no subtype of Representation is specified in the associated dynamic view type.
Protected methodOnConnect
Called when the connection between the component and the server is established.
(Inherited from MvEndPoint.)
Public methodOnNewRpModel
Model Management. Before creating a representation for a given dynamic representation model, the object server sends a copy of this model to the component. This empty member function is called each time the component receives a new or an updated dynamic representation model. This function is empty and can be overridden.
Protected methodOnNewS2CPendingTrans
Called each time the process of a server to component transaction is postponed.

Note that the processing of a pending transaction is automatically delayed if another server-to-component transaction is already being processed.

Public methodOpenView(String, String, MvValue, Boolean)
Opens an instance of a dynamic view on a server object.
Public methodOpenView(String, String, MvValue, MvValue, Int32, Boolean)
Opens an instance of a dynamic view on a server object.
Public methodRecvMessage
Called upon reception of a message issued by the server (see IlsMvServer:ReplyMessage).
Public methodRestartS2CTrans
Restarts the processing of server-to-component transactions.
Public methodRollbackC2STransaction
Rolls back the current component-to-server transaction, previously initialized by the beginC2STransaction function.
Public methodSetIOAdapters
Sets a message encoder and decoder to the endpoint.
(Inherited from MvEndPoint.)
Public methodSuspendS2CTrans
Suspends the processing of any new transaction issued by the server.
Public methodTransactionDelegates
Returns all the transaction delegates that are waiting for a transaction.
Top
Properties
  NameDescription
Public propertyC2SPendingTransCount
Gets the number of component to server pending transactions.
Public propertyC2STransactionDepth
Gets the depth of the current component-to-server transaction.
Public propertyDecoder
Gets the message decoder.
(Inherited from MvEndPoint.)
Public propertyDefaultC2STransactionMode
Gets or sets the component-to-server default transaction status.
Public propertyEncoder
Gets the message encoder.
(Inherited from MvEndPoint.)
Public propertyExitOnDeletion
Specifies if Exit is called when the component is destroyed.
Public propertyhasC2SUpdates
Gets a value that indicates if the current component to server transaction is not empty.
Public propertyInC2STransaction
Gets a value indicating if a component-to-server transaction is already initialized in the component.
Public propertyInS2CTransaction
Gets a value that whether a server-to-component transaction is being processed.
Public propertyStatic memberMsgStream
Gets or sets the writer on which messages received from the server are written.
Public propertyName
Gets the component name.
Public propertyPeerHost
Gets the host name of the connected process.
(Inherited from MvEndPoint.)
Public propertyPeerName
Gets the name of the connected process.
(Inherited from MvEndPoint.)
Public propertyRepresentations
Gets IEnumerable on all the representations of this component.
Public propertyS2CPendingTransCount
Gets the number of component to server pending transactions.
Public propertySuspendedS2CTransNb
Suspends the processing of any new transaction issued by the server.
Public propertyThereIsSuspendedS2CTrans
Gets a value indicating if there is a suspended transaction.
Public propertyTransactionId
Gets the identifier of the current component-to-server transaction.
Top
Events
  NameDescription
Public eventCloseRepresentation
Called when user has called Close(Boolean) on the representation.
Public eventConnected
Called when the component is connected.
Public eventConnectionAllowed
Called if the connection has been allowed by the server.
Public eventConnectionDenied
Called if the connection has been denied by the server.
Public eventCreateRepresentation
Called during when a new Representation is created.
Public eventDeleteRepresentation
Called when the representation is being deleted.
Public eventDisconnected
Called when the component is disconnected.
Public eventRepresentationCreated
Called at the end of the initial notification transaction when all RpObjects have been created .
Top
Remarks

Opening a view causes a representation to be created in the component. Components feature a transaction mechanism to control how representation updates are notified to the server and how server feedbacks are performed on the representations.

Transaction Control

All interactions between an object server and a component are based on a two-tier transaction system, that takes place both on the server side and on the component side. There are two kinds of transactions: those used to handle requests sent to the server (C2S transactions) and those used to handle requests received from the server (S2C transactions). A component-to-server transaction can be created by a component explicitly by calling the BeginC2STransaction method.

This function buffers all the requests sent to the server until the transaction i7s committed by the CommitC2STransaction function or rolled back by the RollbackC2STransaction function. Bufferization supports a three-tier control at: component levelrepresentation levelrepresentation object level

Rogue Wave Server provides asynchronous acknowledgement and rollback features for component-to-server transactions. The acknowledgement feature is set through DefaultC2STransactionMode. When this feature is enabled, any transaction committed first by the component, and then by the server, triggers in turn an acknowledgement transaction to the component.

The acknowledgement is then propagated to all representations and representation objects that have been updated by the component. If a transaction committed by a component to the server fails, it triggers in turn a rollback transaction from the server to the component. There are two reasons why a transaction sent by the component may be rolled back: The transaction is rejected by the server. As a result, the rollback transaction from the server to the component triggers the appropriate requests for the representation objects to be kept consistent with the server. The transaction is locally aborted by the component. When the asynchronous rollback mode is enabled, the server is requested to update the component, as if the transaction had been actually committed by the component and rejected by the server.

When the asynchronous rollback mode is disabled, a rollback transaction is carried out on the component. The type of a server to-component transaction is defined by the S2CTransactionStatus enum type.

See Also