//******************************************************************************************************
// IServiceBusService.cs - Gbtc
//
// Copyright © 2012, Grid Protection Alliance. All Rights Reserved.
//
// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
// the NOTICE file distributed with this work for additional information regarding copyright ownership.
// The GPA licenses this file to you under the MIT License (MIT), the "License"; you may
// not use this file except in compliance with the License. You may obtain a copy of the License at:
//
// http://www.opensource.org/licenses/MIT
//
// Unless agreed to in writing, the subject software distributed under the License is distributed on an
// "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
// License for the specific language governing permissions and limitations.
//
// Code Modification History:
// ----------------------------------------------------------------------------------------------------
// 10/06/2010 - Pinal C. Patel
// Generated original version of source code.
// 10/26/2010 - Pinal C. Patel
// Added management operations GetClients(), GetQueues() and GetTopics().
// 10/29/2010 - Pinal C. Patel
// Made all operations two-way (IsOneWay = false, the default) so OperationContext.RequestContext
// is available when operations are invoked so security can be applied to them.
// 02/03/2011 - Pinal C. Patel
// Added GetLatestMessage() operation that can be used to retrieve the latest message published
// to the subscribers of a topic.
// 12/20/2012 - Starlynn Danyelle Gilliam
// Modified Header.
//
//******************************************************************************************************
using System.Collections.Generic;
using System.ServiceModel;
using GSF.ServiceModel;
namespace GSF.ServiceBus
{
///
/// Defines a service bus for event-based messaging between disjoint systems.
///
[ServiceContract(SessionMode = SessionMode.Allowed, CallbackContract = typeof(IServiceBusServiceCallback))]
public interface IServiceBusService : ISelfHostingService
{
#region [ Methods ]
///
/// Registers with the to produce or consume s.
///
/// An containing registration data.
[OperationContract]
void Register(RegistrationRequest request);
///
/// Unregisters a previous registration with the to produce or consume s
///
/// The used when registering.
[OperationContract]
void Unregister(RegistrationRequest request);
///
/// Sends the to the for distribution amongst its registered consumers.
///
/// The that is to be distributed.
[OperationContract]
void Publish(Message message);
///
/// Gets the latest distributed to the subscribers of the specified .
///
/// The topic used when registering.
/// The latest distributed to the subscribers.
[OperationContract]
Message GetLatestMessage(RegistrationRequest topic);
///
/// Gets a list of all clients connected to the .
///
/// An of objects.
[OperationContract]
ICollection GetClients();
///
/// Gets a list of all s registered on the .
///
/// An of objects.
[OperationContract]
ICollection GetQueues();
///
/// Gets a list of all s registered on the .
///
/// An of objects.
[OperationContract]
ICollection GetTopics();
#endregion
}
}