CSLA.NET 6.0.0
CSLA .NET is a software development framework that helps you build a reusable, maintainable object-oriented business layer for your app.
Csla.Channels.RabbitMq.RabbitMqProxy Class Reference

Implements a data portal proxy to relay data portal calls to a remote application server by using RabbitMQ. More...

Inheritance diagram for Csla.Channels.RabbitMq.RabbitMqProxy:
Csla.DataPortalClient.DataPortalProxy Csla.DataPortalClient.IDataPortalProxy Csla.Server.IDataPortalServer

Public Member Functions

 RabbitMqProxy (ApplicationContext applicationContext, RabbitMqProxyOptions options)
 Creates an instance of the object, initializing it to use the supplied URL. More...
 
override async Task< DataPortalResultCreate (Type objectType, object criteria, DataPortalContext context, bool isSync)
 Called by DataPortal to create a new business object. More...
 
override async Task< DataPortalResultFetch (Type objectType, object criteria, DataPortalContext context, bool isSync)
 Called by DataPortal to load an existing business object. More...
 
override async Task< DataPortalResultUpdate (object obj, DataPortalContext context, bool isSync)
 Called by DataPortal to update a business object. More...
 
override async Task< DataPortalResultDelete (Type objectType, object criteria, DataPortalContext context, bool isSync)
 Called by DataPortal to delete a business object. More...
 
void Dispose ()
 Dispose this object and its resources. More...
 
- Public Member Functions inherited from Csla.DataPortalClient.DataPortalProxy
 DataPortalProxy (ApplicationContext applicationContext)
 

Protected Member Functions

virtual void InitializeRabbitMQ ()
 Method responsible for creating the Connection, Channel, ReplyQueue, and DataPortalQueueName values used for bi-directional communication. More...
 
override async Task< byte[]> CallDataPortalServer (byte[] serialized, string operation, string routingToken, bool isSync)
 Create message and send to Rabbit MQ server. More...
 
- Protected Member Functions inherited from Csla.DataPortalClient.DataPortalProxy
virtual CriteriaRequest ConvertRequest (CriteriaRequest request)
 Override this method to manipulate the message request data sent to the server. More...
 
virtual UpdateRequest ConvertRequest (UpdateRequest request)
 Override this method to manipulate the message request data sent to the server. More...
 
virtual DataPortalResponse ConvertResponse (DataPortalResponse response)
 Override this method to manipulate the message request data returned from the server. More...
 

Properties

override int Timeout = 30 [getset]
 Gets or sets the timeout for network operations in seconds (default is 30 seconds). More...
 
IConnection Connection [getset]
 Gets or sets the connection to the RabbitMQ service. More...
 
IModel Channel [getset]
 Gets or sets the channel (model) for RabbitMQ. More...
 
string DataPortalQueueName [getset]
 Gets or sets the name of the data portal service queue. More...
 
- Properties inherited from Csla.DataPortalClient.DataPortalProxy
ApplicationContext ApplicationContext [getset]
 Gets or sets the current ApplicationContext object. More...
 
virtual bool IsServerRemote [get]
 Gets a value indicating whether the data portal is hosted on a remote server. More...
 
virtual int Timeout [getset]
 Gets or sets the Client timeout in milliseconds (0 uses default timeout). More...
 
string DataPortalUrl [getprotected set]
 Gets the URL address for the data portal server used by this proxy instance. More...
 
- Properties inherited from Csla.DataPortalClient.IDataPortalProxy
bool IsServerRemote [get]
 Get a value indicating whether this proxy will invoke a remote data portal server, or run the "server-side" data portal in the caller's process and AppDomain. More...
 

Detailed Description

Implements a data portal proxy to relay data portal calls to a remote application server by using RabbitMQ.

Definition at line 20 of file RabbitMqProxy.cs.

Constructor & Destructor Documentation

◆ RabbitMqProxy()

Csla.Channels.RabbitMq.RabbitMqProxy.RabbitMqProxy ( ApplicationContext  applicationContext,
RabbitMqProxyOptions  options 
)

Creates an instance of the object, initializing it to use the supplied URL.

Parameters
applicationContext
optionsProxy options

Definition at line 28 of file RabbitMqProxy.cs.

Member Function Documentation

◆ CallDataPortalServer()

override async Task< byte[]> Csla.Channels.RabbitMq.RabbitMqProxy.CallDataPortalServer ( byte[]  serialized,
string  operation,
string  routingToken,
bool  isSync 
)
protectedvirtual

Create message and send to Rabbit MQ server.

Return Response from server

Parameters
serializedSerialised request
operationDataPortal operation
routingTokenRouting Tag for server
isSyncTrue if the client-side proxy should synchronously invoke the server.
Returns
Serialised response from server

Implements Csla.DataPortalClient.DataPortalProxy.

Definition at line 181 of file RabbitMqProxy.cs.

◆ Create()

override async Task< DataPortalResult > Csla.Channels.RabbitMq.RabbitMqProxy.Create ( Type  objectType,
object  criteria,
DataPortalContext  context,
bool  isSync 
)
virtual

Called by DataPortal to create a new business object.

Parameters
objectTypeType of business object to create.
criteriaCriteria object describing business object.
contextDataPortalContext object passed to the server.
isSyncTrue if the client-side proxy should synchronously invoke the server.

Reimplemented from Csla.DataPortalClient.DataPortalProxy.

Definition at line 107 of file RabbitMqProxy.cs.

◆ Delete()

override async Task< DataPortalResult > Csla.Channels.RabbitMq.RabbitMqProxy.Delete ( Type  objectType,
object  criteria,
DataPortalContext  context,
bool  isSync 
)
virtual

Called by DataPortal to delete a business object.

Parameters
objectTypeType of business object to create.
criteriaCriteria object describing business object.
contextServer.DataPortalContext object passed to the server.
isSyncTrue if the client-side proxy should synchronously invoke the server.

Reimplemented from Csla.DataPortalClient.DataPortalProxy.

Definition at line 163 of file RabbitMqProxy.cs.

◆ Dispose()

void Csla.Channels.RabbitMq.RabbitMqProxy.Dispose ( )

Dispose this object and its resources.

Definition at line 213 of file RabbitMqProxy.cs.

◆ Fetch()

override async Task< DataPortalResult > Csla.Channels.RabbitMq.RabbitMqProxy.Fetch ( Type  objectType,
object  criteria,
DataPortalContext  context,
bool  isSync 
)
virtual

Called by DataPortal to load an existing business object.

Parameters
objectTypeType of business object to create.
criteriaCriteria object describing business object.
contextServer.DataPortalContext object passed to the server.
isSyncTrue if the client-side proxy should synchronously invoke the server.

Reimplemented from Csla.DataPortalClient.DataPortalProxy.

Definition at line 126 of file RabbitMqProxy.cs.

◆ InitializeRabbitMQ()

virtual void Csla.Channels.RabbitMq.RabbitMqProxy.InitializeRabbitMQ ( )
protectedvirtual

Method responsible for creating the Connection, Channel, ReplyQueue, and DataPortalQueueName values used for bi-directional communication.

Definition at line 67 of file RabbitMqProxy.cs.

◆ Update()

override async Task< DataPortalResult > Csla.Channels.RabbitMq.RabbitMqProxy.Update ( object  obj,
DataPortalContext  context,
bool  isSync 
)
virtual

Called by DataPortal to update a business object.

Parameters
objThe business object to update.
contextServer.DataPortalContext object passed to the server.
isSyncTrue if the client-side proxy should synchronously invoke the server.

Reimplemented from Csla.DataPortalClient.DataPortalProxy.

Definition at line 144 of file RabbitMqProxy.cs.

Property Documentation

◆ Channel

IModel Csla.Channels.RabbitMq.RabbitMqProxy.Channel
getsetprotected

Gets or sets the channel (model) for RabbitMQ.

Definition at line 48 of file RabbitMqProxy.cs.

◆ Connection

IConnection Csla.Channels.RabbitMq.RabbitMqProxy.Connection
getsetprotected

Gets or sets the connection to the RabbitMQ service.

Definition at line 43 of file RabbitMqProxy.cs.

◆ DataPortalQueueName

string Csla.Channels.RabbitMq.RabbitMqProxy.DataPortalQueueName
getsetprotected

Gets or sets the name of the data portal service queue.

Definition at line 54 of file RabbitMqProxy.cs.

◆ Timeout

override int Csla.Channels.RabbitMq.RabbitMqProxy.Timeout = 30
getset

Gets or sets the timeout for network operations in seconds (default is 30 seconds).

Definition at line 38 of file RabbitMqProxy.cs.