C# Class FluorineFx.Messaging.MessageBroker

Show file Open project: jdecuyper/FluorineFx Class Usage Examples

Public Properties

Property Type Description
DefaultMessageBrokerId string

Private Properties

Property Type Description
AddEndpoint void
AddFactory void
AddService void
GetClient FluorineFx.Messaging.Api.IClient
GetDestination FluorineFx.Messaging.Destination
GetEndpoint IEndpoint
GetEndpoint IEndpoint
GetService IService
GetService IService
GetServiceByDestinationId IService
GetServiceByMessageType IService
RegisterDestination void
RouteMessage IMessage
StartEndpoints void
StartServices void
StopEndpoints void
StopServices void
TraceChannelSettings void

Public Methods

Method Description
GetDestinationBySource ( string source ) : string

Gets the destination Id for the specified source.

GetDestinationId ( IMessage message ) : string

Gets the destination Id from the specified IMessage instance.

GetDestinationId ( string source ) : string

Gets the destination Id for the specified source.

GetFactory ( string id ) : IFlexFactory

Returns the IFlexFactory with the specified Id.

GetMessageBroker ( string messageBrokerId ) : MessageBroker

Gets the MessageBroker object for the current request.

MessageBroker ( FluorineFx.Messaging.MessageServer messageServer ) : System

Initializes a new instance of the MessageBroker class.

RouteMessage ( IMessage message ) : IMessage

Call this method in order to send a message from your code into the message routing system. The message is routed to a service that is defined to handle messages of this type. Once the service is identified, the destination property of the message is used to find a destination configured for that service. The adapter defined for that destination is used to handle the message.

Start ( ) : void

Start the message broker.

Stop ( ) : void

Stop the message broker.

Protected Methods

Method Description
RegisterMessageBroker ( ) : void

Registers the message broker.

UnregisterMessageBroker ( ) : void

Unregisters the message broker.

Private Methods

Method Description
AddEndpoint ( IEndpoint endpoint ) : void
AddFactory ( string id, IFlexFactory factory ) : void
AddService ( IService service ) : void
GetClient ( string id ) : FluorineFx.Messaging.Api.IClient
GetDestination ( string destinationId ) : FluorineFx.Messaging.Destination
GetEndpoint ( string endpointId ) : IEndpoint
GetEndpoint ( string path, string contextPath, bool secure ) : IEndpoint
GetService ( IMessage message ) : IService
GetService ( string id ) : IService
GetServiceByDestinationId ( string destinationId ) : IService
GetServiceByMessageType ( string messageRef ) : IService
RegisterDestination ( FluorineFx.Messaging.Destination destination, IService service ) : void
RouteMessage ( IMessage message, IEndpoint endpoint ) : IMessage

Call this method in order to send a message from your code into the message routing system. The message is routed to a service that is defined to handle messages of this type. Once the service is identified, the destination property of the message is used to find a destination configured for that service. The adapter defined for that destination is used to handle the message.

StartEndpoints ( ) : void

Start all of the broker's endpoints.

StartServices ( ) : void

Start all of the broker's services.

StopEndpoints ( ) : void

Stop all of the broker's endpoints.

StopServices ( ) : void

Stop all of the broker's services.

TraceChannelSettings ( ) : void

Method Details

GetDestinationBySource() public method

Gets the destination Id for the specified source.
public GetDestinationBySource ( string source ) : string
source string The destination's source property.
return string

GetDestinationId() public method

Gets the destination Id from the specified IMessage instance.
public GetDestinationId ( IMessage message ) : string
message IMessage The message that should be handled by the destination.
return string

GetDestinationId() public method

Gets the destination Id for the specified source.
public GetDestinationId ( string source ) : string
source string The source should be handled by the destination.
return string

GetFactory() public method

Returns the IFlexFactory with the specified Id.
public GetFactory ( string id ) : IFlexFactory
id string FlexFactory identity.
return IFlexFactory

GetMessageBroker() public static method

Gets the MessageBroker object for the current request.
public static GetMessageBroker ( string messageBrokerId ) : MessageBroker
messageBrokerId string Ignored.
return MessageBroker

MessageBroker() public method

Initializes a new instance of the MessageBroker class.
public MessageBroker ( FluorineFx.Messaging.MessageServer messageServer ) : System
messageServer FluorineFx.Messaging.MessageServer
return System

RegisterMessageBroker() protected method

Registers the message broker.
protected RegisterMessageBroker ( ) : void
return void

RouteMessage() public method

Call this method in order to send a message from your code into the message routing system. The message is routed to a service that is defined to handle messages of this type. Once the service is identified, the destination property of the message is used to find a destination configured for that service. The adapter defined for that destination is used to handle the message.
public RouteMessage ( IMessage message ) : IMessage
message IMessage The message to be routed to a service.
return IMessage

Start() public method

Start the message broker.
public Start ( ) : void
return void

Stop() public method

Stop the message broker.
public Stop ( ) : void
return void

UnregisterMessageBroker() protected method

Unregisters the message broker.
protected UnregisterMessageBroker ( ) : void
return void

Property Details

DefaultMessageBrokerId public static property

Default MessageBroker identity.
public static string DefaultMessageBrokerId
return string