//
// Licensed to the Apache Software Foundation (ASF) under one or more
// contributor license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright ownership.
// The ASF licenses this file to You under the Apache License, Version 2.0
// (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.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// .Net StockTrader Sample WCF Application for Benchmarking, Performance Analysis and Design Considerations for Service-Oriented Applications
using System.ServiceModel;
using Trade.ConfigServiceDataContract;
namespace Trade.ConfigServiceContract
{
///
/// This is the service contract for the Configuration Service. It defines the service layer operations
/// that are separately implemented in the implementation class.
///
[ServiceContract(Name = "ConfigServiceService", Namespace = "http://Trade.TraderConfigHost")]
public interface IConfigService
{
///
/// Get configurations of a client
///
/// Name of the client
/// Object ClientConfigRequest
[OperationContract]
ClientConfigResponse GetClientConfig(ClientConfigRequest client);
///
/// Get configurations of a business service
///
[OperationContract]
BSConfigResponse GetBSConfig(BSConfigRequest bs);
///
/// Get configurations of an order processor service
///
[OperationContract]
OPSConfigResponse GetOPSConfig(OPSConfigRequest ops);
///
/// Sets connection from client to business service
///
[OperationContract(Action = "ClientToBS")]
void SetClientToBS(ClientToBS clientConfig);
///
/// Sets connection from business service to order processor service
///
[OperationContract(Action = "BSToOPS")]
void SetBSToOPS(BSToOPS bsConfig);
///
/// Gets all business service locations
///
[OperationContract]
ServiceLocation[] GetBSLocations();
///
/// Gets all the order processing service locations
///
[OperationContract]
ServiceLocation[] GetOPSLocations();
///
/// Sets service location (End point URL) of a given service.
///
/// Service Location object consisting of a ServiceName, ServiceUrl and SEC value
[OperationContract(Action = "ServiceLocation")]
void SetServiceLocation(ServiceLocation location);
/*************************************************************************************
* TODO: The rest of these methods have been defined in the PHP Configuration Class.
* They may need to be defined for the user interface
///
/// Set the database configuration of a DB
///
/// DBConfig object consisting of the DBName, DBPort and DBHostname that is to be set
[OperationContract(Action = "DBConfig")]
void SetDbConfig(DBConfig config);
///
/// Look up all the databases set up
///
/// DBConfigs for all the DBs
[OperationContract]
DBConfig[] GetDBConfigs();
///
/// Sets active database.
///
/// Name of the active database
[OperationContract(Action = "ActiveDB")]
void SetActiveDB(string activeConfig);
///
/// Get active database.
///
[OperationContract]
DBConfig GetActiveDB();
///
/// Sets service location (End point URL) of a given service.
///
/// Service Location object consisting of a ServiceName, ServiceUrl and SEC value
[OperationContract(Action = "ServiceLocation")]
void SetServiceLocation(ServiceLocation location);
///
/// Get all connections from client to business service
///
[OperationContract(Action = "GetClientToBSConnections")]
ClientToBS[] GetClientToBsConnections();
///
/// Get all connections from business service to order processor service
///
[OperationContract(Action = "GetBSToOPSConnections")]
BSToOPS[] GetBSToOPSConnections();
********************************************************************************/
}
}