UNPKG

com.phloxui

Version:

PhloxUI Ng2+ Framework

65 lines (64 loc) 3.26 kB
import { Http, Response } from '@angular/http'; import { PhloxAppInfo } from '../component/model/PhloxAppInfo'; import { BackgroundProcess } from '../share/model/BackgroundProcess'; import { AbstractServerResource } from './AbstractServerResource'; import { IConnectionManager } from './IConnectionManager'; import { IBackgroundProcessManager } from './IBackgroundProcessManager'; export declare class DefaultConnectionManager implements IConnectionManager { private PROCESS_OPTIONS; private bgProcessMgr; private http; private phloxAppInfo; private baseURLs; private defaultHeaders; private search; private params; private mode; private name; constructor(baseURLs: string | string[], http: Http, bgProcMgr: IBackgroundProcessManager); private getMaxDurationMillisec(); private getResponseBodyAsContent(response); private getResponseBodyHttpPromise(httpProm); private loadBalanceURL(); private getAppendBaseURL(value); private addConnectionOptionsSetting(options); private addRequestOptionsSearch(options, search); private addRequestOptionsParams(options, params); private addRequestOptionsHeaders(options, headers); getPhloxAppInfo(): PhloxAppInfo; setPhloxAppInfo(phloxAppInfo: PhloxAppInfo): void; get(url: string, requestOptionsArgs: any): Promise<any>; getWithHttpInfo(url: string, requestOptionsArgs: any): Promise<Response>; post(url: string, body: any, requestOptionsArgs: any): Promise<any>; postWithHttpInfo(url: string, body: any, requestOptionsArgs: any): Promise<Response>; put(url: string, body: any, requestOptionsArgs: any): Promise<any>; putWithHttpInfo(url: string, body: any, requestOptionsArgs: any): Promise<Response>; delete(url: string, requestOptionsArgs: any): Promise<any>; deleteWithHttpInfo(url: string, requestOptionsArgs: any): Promise<Response>; patch(url: string, body: any, requestOptionsArgs: any): Promise<any>; patchWithHttpInfo(url: string, body: any, requestOptionsArgs: any): Promise<Response>; head(url: string, requestOptionsArgs: any): Promise<any>; headWithHttpInfo(url: string, requestOptionsArgs: any): Promise<Response>; options(url: string, requestOptionsArgs: any): Promise<any>; optionsWithHttpInfo(url: string, requestOptionsArgs: any): Promise<Response>; request(url: string, requestOptionsArgs: any): Promise<any>; requestWithHttpInfo(url: string, requestOptionsArgs: any): Promise<Response>; getRunningProcessesCount(option?: any): number; getRunningProcesses(option?: any): BackgroundProcess[]; getConnectionQuality(): number; addBaseURLs(url: string): void; setBaseURLs(urls: string | string[]): void; resetBaseURLs(): void; setDefaultHeader(key: string, value: string): void; removeDefaultHeader(key: string): void; resetDefaultHeaders(): void; setSearch(key: string, value: any): void; removeSearch(key: string): void; resetSearch(): void; setParam(key: string, value: any): void; removeParam(key: string): void; resetParams(): void; getName(): string; setName(name: string): void; createResource<R extends AbstractServerResource>(type: new (conMgr: IConnectionManager) => R): R; }