public abstract class AbstractClient extends Object implements Client
Client
implementations.Constructor and Description |
---|
AbstractClient()
Creates a new AbstractClient.
|
Modifier and Type | Method and Description |
---|---|
protected abstract Connection |
findConnection(Message[] messages)
Locates a
Connection to send a message on. |
String |
send(Callback<Reply> callback,
Message... messages)
Sends a message on the connection.
|
String |
send(Message... messages)
Sends a message on the connection.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, getClusterType, getConfig, getDefaultDurability, getDefaultReadPreference
public String send(Callback<Reply> callback, Message... messages)
Overridden to locate the .
send
in interface Client
callback
- The callback to notify of responses to the messages. May be
null.messages
- The messages to send on the connection. The messages will be
sent one after the other and are guaranteed to be contiguous
and have sequential message ids.Client.send(Callback,Message[])
public String send(Message... messages)
Overridden to locate the .
send
in interface Client
messages
- The messages to send on the connection. The messages will be
sent one after the other and are guaranteed to be contiguous
and have sequential message ids.Client.send(Message[])
protected abstract Connection findConnection(Message[] messages) throws MongoDbException
Connection
to send a message on.messages
- The messages that will be sent. The connection return should
be compatible with all of the messages ReadPreference
.Connection
to send a message on.MongoDbException
- In the case of an error finding a Connection
.Copyright © 2011-2012 Allanbank Consulting, Inc.. All Rights Reserved.