All Downloads are FREE. Search and download functionalities are using the official Maven repository.

public.javadoc.org.spincast.plugins.httpclient.websocket.builders.WebsocketRequestBuilderDefault.html Maven / Gradle / Ivy

There is a newer version: 2.2.0
Show newest version






WebsocketRequestBuilderDefault (org.spincast:spincast-framework 1.0.0 API)












org.spincast.plugins.httpclient.websocket.builders

Class WebsocketRequestBuilderDefault

    • Field Detail

      • logger

        protected final org.slf4j.Logger logger
    • Method Detail

      • getPingsIntervalSeconds

        protected int getPingsIntervalSeconds()
      • ping

        public WebsocketRequestBuilder ping(int seconds)
        Description copied from interface: WebsocketRequestBuilder
        You can use this to configure the pings that are automatically sent to the Websocket endpoint every X seconds. WebsocketClientHandler#onConnectionClosed() will be called if the connection is closed.

        Use a value <= 0 to disable the pings.

        The automatic pings and their default interval are also configurable using: SpincastHttpClientWithWebsocketConfig#isWebsocketAutomaticPingEnabled()
        and
        SpincastHttpClientWithWebsocketConfig#getWebsocketAutomaticPingIntervalSeconds()

        Pings are enabled by default.

        Specified by:
        ping in interface WebsocketRequestBuilder
        Parameters:
        seconds - the interval in seconds or <= 0 to disable the pings.
      • addWebsocketRequestHeaders

        protected void addWebsocketRequestHeaders()
      • getWebsocketWriteCallback

        protected io.undertow.websockets.core.WebSocketCallback<Void> getWebsocketWriteCallback(WebsocketClientHandler reader)
      • getXnio

        protected org.xnio.Xnio getXnio()
      • createXnioWorker

        protected org.xnio.XnioWorker createXnioWorker()
      • getSslContext

        protected SSLContext getSslContext()
      • createByteBufferPool

        protected io.undertow.server.DefaultByteBufferPool createByteBufferPool()
      • createWebSocketChannel

        protected io.undertow.websockets.core.WebSocketChannel createWebSocketChannel()
      • createWebSocketChannel

        protected io.undertow.websockets.core.WebSocketChannel createWebSocketChannel(org.xnio.XnioWorker worker,
                                                                                      io.undertow.server.DefaultByteBufferPool bufferPool,
                                                                                      String url,
                                                                                      int redirectionNbr)
      • createConnectionBuilder

        protected io.undertow.websockets.client.WebSocketClient.ConnectionBuilder createConnectionBuilder(org.xnio.XnioWorker worker,
                                                                                                          io.undertow.server.DefaultByteBufferPool bufferPool,
                                                                                                          String url)
      • addSslContext

        protected void addSslContext(io.undertow.websockets.client.WebSocketClient.ConnectionBuilder connectionBuilder)
      • createWebsocketUri

        protected URI createWebsocketUri(String url)
      • createSupportedSubProtocols

        protected List<String> createSupportedSubProtocols()
      • createSupportedExtensions

        protected List<io.undertow.websockets.WebSocketExtension> createSupportedExtensions()
      • sendOnStringMessageClientEvent

        protected void sendOnStringMessageClientEvent(String message)
        Sends a "String message" event to the app.
      • sendOnBytesMessageClientEvent

        protected void sendOnBytesMessageClientEvent(byte[] message)
        Sends a "Bytes message" event to the app.
      • sendOnConnectionClosedMessageClientEvent

        protected void sendOnConnectionClosedMessageClientEvent(int code,
                                                                String reason)
        Sends a "Connection closed message" event to the app.
      • sendClientEventInNewThread

        protected void sendClientEventInNewThread(Runnable runnable)
        Sends an event to the client in a separated thread.
      • getThreadExecutorForClientEventsTimeoutAmount

        protected int getThreadExecutorForClientEventsTimeoutAmount()
        The timeout amount before cancelling a task when sending events to the application.
      • getThreadExecutorForClientEventsTimeoutTimeUnit

        protected TimeUnit getThreadExecutorForClientEventsTimeoutTimeUnit()
        The timeout asdasd before cancelling a task when sending events to the application.
      • getThreadExecutorForClientEvents

        protected ExecutorService getThreadExecutorForClientEvents()
        The ExecutorService to use to send events to the client.
      • getThreadExecutorForClientEventsThreadNumber

        protected int getThreadExecutorForClientEventsThreadNumber()
        The maximum number of concurrent threads used when sending events to the application.
      • getThreadExecutorForClientEventsThreadThreadFactory

        protected ThreadFactory getThreadExecutorForClientEventsThreadThreadFactory()
        The ThreadFactory to use for the Executor that sends events to the client.
        Returns:
        the ThreadFactory to use or null to use the default one.

Copyright © 2019. All rights reserved.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy