This commit is contained in:
crusader 2017-09-27 18:52:38 +09:00
parent 5a6d350a8e
commit 61597d4581
3 changed files with 22 additions and 4 deletions

View File

@ -60,6 +60,7 @@ import AsyncRequest from '@overflow/app/redux/saga/AsyncRequest';
import AsyncRestRequest from '@overflow/app/redux/saga/AsyncRestRequest'; import AsyncRestRequest from '@overflow/app/redux/saga/AsyncRestRequest';
import DiscoveryService from '@overflow/discovery/api/service/DiscoveryService'; import DiscoveryService from '@overflow/discovery/api/service/DiscoveryService';
import NoAuthProbeService from '@overflow/noauthprobe/api/service/NoAuthProbeService';
// Container Configuration // Container Configuration
export interface ContainerConfig { export interface ContainerConfig {
@ -147,9 +148,9 @@ const reduxConfig: ReduxConfig = {
], ],
}; };
const serviceConfig: Map<string, APIService> = new Map([ const serviceConfig: Map<string, APIService> = new Map();
['DiscoveryService', DiscoveryService], serviceConfig.set('DiscoveryService', DiscoveryService.prototype);
]); serviceConfig.set('NoAuthProbeService', NoAuthProbeService.prototype);
// Configuration // Configuration
export interface Config { export interface Config {

View File

@ -108,7 +108,7 @@ class OFApplication {
private initRpcClient(): Promise<WebSocketRPC> { private initRpcClient(): Promise<WebSocketRPC> {
const rpcClient = new Promise<WebSocketRPC>((resolve, reject) => { const rpcClient = new Promise<WebSocketRPC>((resolve, reject) => {
let serviceInvoker = new ServiceInvoker(this.config.service); let serviceInvoker = new ServiceInvoker(this.config.service);
let client = new WebSocketRPC(this.config.rpc.url); let client = new WebSocketRPC(this.config.rpc.url, serviceInvoker);
client.initialize() client.initialize()
.then(() => { .then(() => {
resolve(client); resolve(client);

View File

@ -0,0 +1,17 @@
import { Service } from '@overflow/commons/api/service';
export class NoAuthProbeService extends Service {
// tslint:disable-next-line:no-empty
public constructor() {
super();
}
public regist(params: any): void {
console.log('Discovery has finished.' + params);
// state change test
}
}
export default NoAuthProbeService;