UNPKG

@farris/bef-vue

Version:
48 lines (47 loc) 1.68 kB
import { HttpHeaders, HttpClient, Injector } from '@farris/devkit-vue'; import { FrameworkSessionService } from '../../../framework-session.service'; import { BaSessionStorageStrategy } from '../storage-strategies'; import { RuntimeContext } from '../../../types'; import { BaSessionHandlingStrategy } from './ba-handling-strategy'; /** * 隔离的BeSession处理策略 */ declare class BaSeparatedSessionHandlingStrategy extends BaSessionHandlingStrategy { /** * 构造函数 */ constructor(storageStrategy: BaSessionStorageStrategy, frameworkSessionService: FrameworkSessionService, httpClient: HttpClient, baseUrl: string, injector: Injector); /** * 获取BeSessionId */ getSessionId(runtimeContext?: RuntimeContext): Promise<string>; /** * 创建BeSessionId */ protected createSession(runtimeContext?: RuntimeContext): Promise<string>; /** * 关闭上次使用的会话 */ protected closeLastTimeUsedSession(): Promise<boolean>; /** * 设置BeSessionId */ setSessionId(sessionId: string, runtimeContext?: RuntimeContext): void; /** * 清空BeSessionId */ clearSessionId(runtimeContext?: RuntimeContext): void; /** * 扩展BeSessionId相关头信息 */ handleRequestHeaders(headers: HttpHeaders, runtimeContext?: RuntimeContext): HttpHeaders; /** * 处理服务器端返回的headers */ handleReponseHeaders(headers: any): void; /** * 获取某个Repository对应的BeSession的唯一key */ protected getSessionStorageKey(runtimeContext?: RuntimeContext): string; } export { BaSeparatedSessionHandlingStrategy };