|
1 |
| -export { default as java_process } from './java_process/java_process'; |
| 1 | +import * as child_process from "child_process"; |
| 2 | +export interface JavaInfo { |
| 3 | + location: string; |
| 4 | + version: string; |
| 5 | +} |
| 6 | +export interface ChildProcessExtended extends child_process.ChildProcess { |
| 7 | + connected: boolean; |
| 8 | +} |
| 9 | +export interface JavaProcessStatus { |
| 10 | + lastErrorFromStdErr: string; |
| 11 | + childUnaskedExit: boolean; |
| 12 | + exitSignal: string; |
| 13 | + errorsFromStdErr: number; |
| 14 | + procErrorOcurred: boolean; |
| 15 | + lastProcError: string; |
| 16 | + msgSent: number; |
| 17 | + normalExit: boolean; |
| 18 | + exitCode: number; |
| 19 | +} |
| 20 | +export declare class JavaProcess { |
| 21 | + private jarPath; |
| 22 | + private args; |
| 23 | + private readyFn; |
| 24 | + DEFAULT_ENCODING: string; |
| 25 | + static DEFAULT_INIT_TIMEOUT: number; |
| 26 | + private javaInfo; |
| 27 | + private process; |
| 28 | + private firstMessageReceived; |
| 29 | + private started; |
| 30 | + private procErrorOcurred; |
| 31 | + private lastProcError; |
| 32 | + private closed; |
| 33 | + private closeData; |
| 34 | + private ready; |
| 35 | + private errorsFromStdErr; |
| 36 | + private msgSent; |
| 37 | + private lastErrorFromStdErr; |
| 38 | + private childUnaskedExit; |
| 39 | + private exitSignal; |
| 40 | + private normalExit; |
| 41 | + private exited; |
| 42 | + private exitCode; |
| 43 | + private pipesOutput; |
| 44 | + private pipesErr; |
| 45 | + private customDisconnect; |
| 46 | + private debugOn; |
| 47 | + private readyCheckString; |
| 48 | + private initTimeout; |
| 49 | + private userNotReadyCallback; |
| 50 | + status(): JavaProcessStatus; |
| 51 | + constructor(jarPath: string, args: string[], readyFn?: Function); |
| 52 | + private initTimeoutFn(); |
| 53 | + start(readyCheck?: string, fnNotReady?: Function): void; |
| 54 | + setInitTimeout(timeout: number): void; |
| 55 | + onReady(javaProcess: JavaProcess): void; |
| 56 | + isReady(): boolean; |
| 57 | + wasStarted(): boolean; |
| 58 | + setCustomDisconnect(disconnectFn: Function): void; |
| 59 | + setDebug(debug: boolean): void; |
| 60 | + kill(signal?: string): void; |
| 61 | + disconnect(): void; |
| 62 | + onDataOnStdErr(data: any): void; |
| 63 | + onDataOnStdOut(data: any): void; |
| 64 | + private compareWithoutNewLinesAndLowerCase(value1, value2); |
| 65 | + onError(data: any): void; |
| 66 | + onClose(code: number, signal: string): void; |
| 67 | + onDisconnect(): void; |
| 68 | + onExit(code?: number, signal?: string): void; |
| 69 | + private buildPassThrough(streamTarget, callback); |
| 70 | + on(event: string, callback: Function): void; |
| 71 | + writeDataToProcess(data: string): void; |
| 72 | + spawn(): void; |
| 73 | + private debug(message, ...optionalParams); |
| 74 | +} |
| 75 | +export declare function checkJava(): JavaInfo; |
| 76 | +export declare function spawn(jarPath: string, args?: string[]): child_process.ChildProcess; |
| 77 | +export default function config(jarPath: string, args: string[], readyFn: Function): JavaProcess; |
0 commit comments