Package com.mongodb.internal.connection
Interface InternalConnection
- All Superinterfaces:
BufferProvider
- All Known Implementing Classes:
InternalStreamConnection
Deprecated.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Deprecated.Closes the connection.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<Void> callback) Deprecated.Opens the connection so its ready for usebooleanopened()Deprecated.Returns if the connection has been openedreceiveMessage(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(List<ByteBuf> byteBuffers, int lastRequestId) Deprecated.Send a message to the server.voidsendMessageAsync(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 Details
-
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
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
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
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
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
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
-