UNPKG

rsocket-rxjs

Version:
44 lines (43 loc) 1.77 kB
import { Observable } from 'rxjs'; import { EncodingRSocket } from '../extensions/encoding-rsocket-client'; import { MessageRoutingRSocket } from '../extensions/messages/message-routing-rsocket'; import { Authentication } from '../extensions/security/authentication'; /** * A builder that should work with Spring Messaging for RSocket */ export declare class SpringRSocketMessagingBuilder { private _config; private _setupData; private _setupMetdata; private _connectionString; keepaliveTime(time: number): this; maxLifetime(time: number): this; dataMimeType(type: string): this; connectMappingRoute(route: string): this; connectMappingData(data: any): this; connectAuthentication(authentication: Authentication): this; connectionString(str: string): this; fragmentMaxSize(sizeInBytes: number): this; private getSetupConfig; private _encodingCustomizer; customizeEncoding(encodingSocketConsumer: (encodingSocket: EncodingRSocket) => void): this; private _preConnectionRoutesCustomizer; customizeMessageRoutingRSocket(socketConsumer: (messageRoutingSocket: MessageRoutingRSocket) => void): this; private _automaticReconnect; private _reconnectWaitTime; automaticReconnect(waitTime?: number): this; /** * * This establishes the connection on subscribe. * Note that this observable will never complete. * Unsubscribing will close the connection. * * To add route mappings before the connection is established use 'customizeMessageRoutingRSocket'. * * To customize encoders use 'customizeEncoding' * * @returns */ build(): Observable<MessageRoutingRSocket>; private buildTransport; }