C# Class GSF.ServiceBus.ServiceBusService

Inheritance: GSF.ServiceModel.SelfHostingService, IServiceBusService
Show file Open project: GridProtectionAlliance/gsf

Public Methods

Method Description
GetClients ( ) : ICollection

Gets a list of all clients connected to the ServiceBusService.

GetLatestMessage ( GSF.ServiceBus.RegistrationRequest topic ) : GSF.ServiceBus.Message

Gets the latest Message distributed to the subscribers of the specified topic.

GetQueues ( ) : ICollection

Gets a list of all MessageType.Queues registered on the ServiceBusService.

GetTopics ( ) : ICollection

Gets a list of all MessageType.Topics registered on the ServiceBusService.

Initialize ( ) : void

Initializes the ServiceBusService.

LoadSettings ( ) : void

Loads saved ServiceBusService settings from the config file if the GSF.Adapters.Adapter.PersistSettings property is set to true.

Publish ( GSF.ServiceBus.Message message ) : void

Sends the message to the ServiceBusService for distribution amongst its registered consumers.

Register ( GSF.ServiceBus.RegistrationRequest request ) : void

Registers with the ServiceBusService to produce or consume Messages.

SaveSettings ( ) : void

Saves ServiceBusService settings to the config file if the GSF.Adapters.Adapter.PersistSettings property is set to true.

Unregister ( GSF.ServiceBus.RegistrationRequest request ) : void

Unregisters a previous registration with the ServiceBusService to produce or consume Messages

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Releases the unmanaged resources used by the ServiceBusService object and optionally releases the managed resources.

OnServiceHostCreated ( ) : void

Raises the SelfHostingService.ServiceHostCreated event.

Private Methods

Method Description
DisconnectClient ( string clientId ) : void
LoadMessages ( ) : void
OnChannelClosing ( object sender, EventArgs e ) : void
OnChannelFaulted ( object sender, EventArgs e ) : void
OnProcessException ( object sender, EventArgs e ) : void
PublishComplete ( PublishContext context ) : void
PublishMessages ( PublishContext contexts ) : void
SaveMessages ( ) : void
ServiceBusService ( ) : System

Method Details

Dispose() protected method

Releases the unmanaged resources used by the ServiceBusService object and optionally releases the managed resources.
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
return void

GetClients() public method

Gets a list of all clients connected to the ServiceBusService.
public GetClients ( ) : ICollection
return ICollection

GetLatestMessage() public method

Gets the latest Message distributed to the subscribers of the specified topic.
public GetLatestMessage ( GSF.ServiceBus.RegistrationRequest topic ) : GSF.ServiceBus.Message
topic GSF.ServiceBus.RegistrationRequest The topic used when registering.
return GSF.ServiceBus.Message

GetQueues() public method

Gets a list of all MessageType.Queues registered on the ServiceBusService.
public GetQueues ( ) : ICollection
return ICollection

GetTopics() public method

Gets a list of all MessageType.Topics registered on the ServiceBusService.
public GetTopics ( ) : ICollection
return ICollection

Initialize() public method

Initializes the ServiceBusService.
The specified is not supported.
public Initialize ( ) : void
return void

LoadSettings() public method

Loads saved ServiceBusService settings from the config file if the GSF.Adapters.Adapter.PersistSettings property is set to true.
public LoadSettings ( ) : void
return void

OnServiceHostCreated() protected method

Raises the SelfHostingService.ServiceHostCreated event.
protected OnServiceHostCreated ( ) : void
return void

Publish() public method

Sends the message to the ServiceBusService for distribution amongst its registered consumers.
public Publish ( GSF.ServiceBus.Message message ) : void
message GSF.ServiceBus.Message The that is to be distributed.
return void

Register() public method

Registers with the ServiceBusService to produce or consume Messages.
public Register ( GSF.ServiceBus.RegistrationRequest request ) : void
request GSF.ServiceBus.RegistrationRequest An containing registration data.
return void

SaveSettings() public method

Saves ServiceBusService settings to the config file if the GSF.Adapters.Adapter.PersistSettings property is set to true.
public SaveSettings ( ) : void
return void

Unregister() public method

Unregisters a previous registration with the ServiceBusService to produce or consume Messages
public Unregister ( GSF.ServiceBus.RegistrationRequest request ) : void
request GSF.ServiceBus.RegistrationRequest The used when registering.
return void