/** * Copyright 2017-2020 Plexus Interop Deutsche Bank AG * SPDX-License-Identifier: Apache-2.0 * * Licensed 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. */ import { InvocationMetaInfo } from '@plexus-interop/protocol'; import { UniqueId, TransportChannel, ChannelObserver } from '@plexus-interop/transport-common'; import { RemoteInvocationInfo } from '@plexus-interop/client-api'; import { BinaryMarshallerProvider, BinaryMarshaller } from '@plexus-interop/io'; import { AnonymousSubscription } from 'rxjs/Subscription'; import { clientProtocol as plexus, SuccessCompletion } from '@plexus-interop/protocol'; import { BlockingQueue, CancellationToken } from '@plexus-interop/common'; export declare function createInvocationInfo(): InvocationMetaInfo; export declare function createRemoteInvocationInfo(): RemoteInvocationInfo; export declare class MockMarshaller implements BinaryMarshaller { encode(messageObj: any): Uint8Array; decode(messagePayload: Uint8Array): any; } export declare class MockMarshallerProvider implements BinaryMarshallerProvider { getMarshaller(type: any): BinaryMarshaller; } export declare class BufferedChannel implements TransportChannel { private cancellationToken; private log; readonly in: BlockingQueue; readonly out: BlockingQueue; readonly id: UniqueId; constructor(cancellationToken: CancellationToken); open(observer: ChannelObserver): void; addToInbox(data: ArrayBuffer): Promise; pullOutMessage(): Promise; isInboxEmpty(): boolean; sendMessage(data: ArrayBuffer): Promise; sendLastMessage(data: ArrayBuffer): Promise; cancel(): void; close(): Promise; uuid(): UniqueId; private listenToMessages; }