Class InternalStreamConnection

    • Constructor Detail

      • InternalStreamConnection

        public InternalStreamConnection​(ServerId serverId,
                                        StreamFactory streamFactory,
                                        java.util.List<MongoCompressor> compressorList,
                                        CommandListener commandListener,
                                        com.mongodb.internal.connection.InternalConnectionInitializer connectionInitializer)
        Deprecated.
    • Method Detail

      • openAsync

        public void openAsync​(SingleResultCallback<java.lang.Void> callback)
        Deprecated.
        Description copied from interface: InternalConnection
        Opens the connection so its ready for use
        Specified by:
        openAsync in interface InternalConnection
        Parameters:
        callback - the callback to be called once the connection has been opened
      • opened

        public boolean opened()
        Deprecated.
        Description copied from interface: InternalConnection
        Returns if the connection has been opened
        Specified by:
        opened in interface InternalConnection
        Returns:
        true if connection has been opened
      • isClosed

        public boolean isClosed()
        Deprecated.
        Description copied from interface: InternalConnection
        Returns the closed state of the connection
        Specified by:
        isClosed in interface InternalConnection
        Returns:
        true if connection is closed
      • sendMessage

        public void sendMessage​(java.util.List<ByteBuf> byteBuffers,
                                int lastRequestId)
        Deprecated.
        Description copied from interface: InternalConnection
        Send a message to the server. The connection may not make any attempt to validate the integrity of the message.
        Specified by:
        sendMessage in interface InternalConnection
        Parameters:
        byteBuffers - the list of byte buffers to send.
        lastRequestId - the request id of the last message in byteBuffers
      • receiveMessage

        public ResponseBuffers receiveMessage​(int responseTo)
        Deprecated.
        Description copied from interface: InternalConnection
        Receive a response to a sent message from the server.
        Specified by:
        receiveMessage in interface InternalConnection
        Parameters:
        responseTo - the request id that this message is a response to
        Returns:
        the response
      • sendMessageAsync

        public void sendMessageAsync​(java.util.List<ByteBuf> byteBuffers,
                                     int lastRequestId,
                                     SingleResultCallback<java.lang.Void> callback)
        Deprecated.
        Description copied from interface: InternalConnection
        Asynchronously send a message to the server. The connection may not make any attempt to validate the integrity of the message.
        Specified by:
        sendMessageAsync in interface InternalConnection
        Parameters:
        byteBuffers - the list of byte buffers to send
        lastRequestId - the request id of the last message in byteBuffers
        callback - the callback to invoke on completion
      • receiveMessageAsync

        public void receiveMessageAsync​(int responseTo,
                                        SingleResultCallback<ResponseBuffers> callback)
        Deprecated.
        Description copied from interface: InternalConnection
        Asynchronously receive a response to a sent message from the server.
        Specified by:
        receiveMessageAsync in interface InternalConnection
        Parameters:
        responseTo - the request id that this message is a response to
        callback - the callback to invoke on completion
      • getBuffer

        public ByteBuf getBuffer​(int size)
        Deprecated.
        Description copied from interface: BufferProvider
        Gets a buffer with the givens capacity.
        Specified by:
        getBuffer in interface BufferProvider
        Parameters:
        size - the size required for the buffer
        Returns:
        a ByteBuf with the given size, which is now owned by the caller and must be released.