Package com.mongodb.internal.connection
Interface InternalConnection
-
- All Superinterfaces:
BufferProvider
- All Known Implementing Classes:
InternalStreamConnection
@Deprecated(since="2021-05-27") public interface InternalConnection extends BufferProvider
Deprecated.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
close()
Deprecated.Closes the connection.ConnectionDescription
getDescription()
Deprecated.Gets the description of this connection.boolean
isClosed()
Deprecated.Returns the closed state of the connectionvoid
open()
Deprecated.Opens the connection so its ready for usevoid
openAsync(SingleResultCallback<Void> callback)
Deprecated.Opens the connection so its ready for useboolean
opened()
Deprecated.Returns if the connection has been openedResponseBuffers
receiveMessage(int responseTo)
Deprecated.Receive a response to a sent message from the server.void
receiveMessageAsync(int responseTo, SingleResultCallback<ResponseBuffers> callback)
Deprecated.Asynchronously receive a response to a sent message from the server.<T> T
sendAndReceive(CommandMessage message, Decoder<T> decoder, SessionContext sessionContext)
Deprecated.Send a command message to the server.<T> void
sendAndReceiveAsync(CommandMessage message, Decoder<T> decoder, SessionContext sessionContext, SingleResultCallback<T> callback)
Deprecated.Send a command message to the server.void
sendMessage(List<ByteBuf> byteBuffers, int lastRequestId)
Deprecated.Send a message to the server.void
sendMessageAsync(List<ByteBuf> byteBuffers, int lastRequestId, SingleResultCallback<Void> callback)
Deprecated.Asynchronously send a message to the server.-
Methods inherited from interface com.mongodb.connection.BufferProvider
getBuffer
-
-
-
-
Method Detail
-
getDescription
ConnectionDescription getDescription()
Deprecated.Gets the description of this connection.- Returns:
- the connection description
-
open
void open()
Deprecated.Opens the connection so its ready for use
-
openAsync
void openAsync(SingleResultCallback<Void> callback)
Deprecated.Opens the connection so its ready for use- Parameters:
callback
- the callback to be called once the connection has been opened
-
close
void close()
Deprecated.Closes the connection.
-
opened
boolean opened()
Deprecated.Returns if the connection has been opened- Returns:
- true if connection has been opened
-
isClosed
boolean isClosed()
Deprecated.Returns the closed state of the connection- Returns:
- true if connection is closed
-
sendAndReceive
<T> T sendAndReceive(CommandMessage message, Decoder<T> decoder, SessionContext sessionContext)
Deprecated.Send a command message to the server.- Parameters:
message
- the command message to sendsessionContext
- the session context
-
sendAndReceiveAsync
<T> void sendAndReceiveAsync(CommandMessage message, Decoder<T> decoder, SessionContext sessionContext, SingleResultCallback<T> callback)
Deprecated.Send a command message to the server.- Parameters:
message
- the command message to sendsessionContext
- the session contextcallback
- the callback
-
sendMessage
void sendMessage(List<ByteBuf> byteBuffers, int lastRequestId)
Deprecated.Send a message to the server. The connection may not make any attempt to validate the integrity of the message.- Parameters:
byteBuffers
- the list of byte buffers to send.lastRequestId
- the request id of the last message in byteBuffers
-
receiveMessage
ResponseBuffers receiveMessage(int responseTo)
Deprecated.Receive a response to a sent message from the server.- Parameters:
responseTo
- the request id that this message is a response to- Returns:
- the response
-
sendMessageAsync
void sendMessageAsync(List<ByteBuf> byteBuffers, int lastRequestId, SingleResultCallback<Void> callback)
Deprecated.Asynchronously send a message to the server. The connection may not make any attempt to validate the integrity of the message.- Parameters:
byteBuffers
- the list of byte buffers to sendlastRequestId
- the request id of the last message in byteBufferscallback
- the callback to invoke on completion
-
receiveMessageAsync
void receiveMessageAsync(int responseTo, SingleResultCallback<ResponseBuffers> callback)
Deprecated.Asynchronously receive a response to a sent message from the server.- Parameters:
responseTo
- the request id that this message is a response tocallback
- the callback to invoke on completion
-
-