//******************************************************************************************************
// ISelfHostingService.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:
// ----------------------------------------------------------------------------------------------------
// 08/21/2009 - Pinal C. Patel
// Generated original version of source code.
// 09/15/2009 - Stephen C. Wills
// Added new header and license agreement.
// 05/28/2010 - Pinal C. Patel
// Added an endpoint for web service help.
// 10/08/2010 - Pinal C. Patel
// Removed REST web service help endpoint since a similar feature is now part of WCF 4.0.
// 10/14/2010 - Pinal C. Patel
// Made changes for hosting flexibility and enabling security:
// Deleted DataFlow since access restriction can now be imposed by enabling security.
// Added SecurityPolicy and PublishMetadata.
// Renamed ServiceUri to Endpoints and ServiceContract to Contract.
// 12/20/2012 - Starlynn Danyelle Gilliam
// Modified Header.
//
//******************************************************************************************************
using System;
using System.IdentityModel.Policy;
using System.ServiceModel;
using GSF.Adapters;
namespace GSF.ServiceModel
{
///
/// Defines a web service that can send and receive data over REST (Representational State Transfer) interface.
///
[ServiceContract]
public interface ISelfHostingService : IAdapter
{
#region [ Members ]
///
/// Occurs when the has been created with the specified .
///
event EventHandler ServiceHostCreated;
///
/// Occurs when the can process requests via all of its endpoints.
///
event EventHandler ServiceHostStarted;
///
/// Occurs when an is encountered when processing a request.
///
event EventHandler> ServiceProcessException;
#endregion
#region [ Properties ]
///
/// Gets or sets a semicolon delimited list of URIs where the web service can be accessed.
///
string Endpoints
{
get;
set;
}
///
/// Gets or sets the of the contract interface implemented by the web service.
///
string ContractInterface
{
get;
set;
}
///
/// Gets or sets a boolean value that indicates whether the will use the current instance of the web service for processing
/// requests or base the web service instance creation on specified in its .
///
bool Singleton
{
get;
set;
}
///
/// Gets or sets the of to be used for securing all web service .
///
string SecurityPolicy
{
get;
set;
}
///
/// Gets or sets a boolean value that indicates whether web service metadata is to made available at all web service .
///
bool PublishMetadata
{
get;
set;
}
///
/// Gets the hosting the web service.
///
ServiceHost ServiceHost
{
get;
}
#endregion
}
}