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 voidclose()Deprecated.Closes the connection.ConnectionDescriptiongetDescription()Deprecated.Gets the description of this connection.booleanisClosed()Deprecated.Returns the closed state of the connectionvoidopen()Deprecated.Opens the connection so its ready for usevoidopenAsync(SingleResultCallback<java.lang.Void> callback)Deprecated.Opens the connection so its ready for usebooleanopened()Deprecated.Returns if the connection has been openedResponseBuffersreceiveMessage(int responseTo)Deprecated.Receive a response to a sent message from the server.voidreceiveMessageAsync(int responseTo, SingleResultCallback<ResponseBuffers> callback)Deprecated.Asynchronously receive a response to a sent message from the server.<T> TsendAndReceive(CommandMessage message, Decoder<T> decoder, SessionContext sessionContext)Deprecated.Send a command message to the server.<T> voidsendAndReceiveAsync(CommandMessage message, Decoder<T> decoder, SessionContext sessionContext, SingleResultCallback<T> callback)Deprecated.Send a command message to the server.voidsendMessage(java.util.List<ByteBuf> byteBuffers, int lastRequestId)Deprecated.Send a message to the server.voidsendMessageAsync(java.util.List<ByteBuf> byteBuffers, int lastRequestId, SingleResultCallback<java.lang.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<java.lang.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(java.util.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(java.util.List<ByteBuf> byteBuffers, int lastRequestId, SingleResultCallback<java.lang.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
-
-