Renamed classes with a two-letter initialism according to convention

This commit is contained in:
delvh
2020-03-24 18:38:47 +01:00
parent c1087a8c6a
commit 5c2abe7c1c
10 changed files with 79 additions and 77 deletions

View File

@@ -11,7 +11,7 @@ import javax.naming.TimeLimitExceededException;
import envoy.client.data.Cache;
import envoy.client.data.ClientConfig;
import envoy.client.data.LocalDb;
import envoy.client.data.LocalDB;
import envoy.client.event.SendEvent;
import envoy.data.*;
import envoy.event.*;
@@ -117,7 +117,7 @@ public class Client implements Closeable {
* Initializes the {@link Receiver} used to process data sent from the server to
* this client.
*
* @param localDb the local database used to persist the current
* @param localDB the local database used to persist the current
* {@link IdGenerator}
* @param receivedMessageCache a message cache containing all unread messages
* from the server that can be relayed after
@@ -126,7 +126,7 @@ public class Client implements Closeable {
* requested from the server
* @since Envoy Client v0.2-alpha
*/
public void initReceiver(LocalDb localDb, Cache<Message> receivedMessageCache) throws IOException {
public void initReceiver(LocalDB localDB, Cache<Message> receivedMessageCache) throws IOException {
checkOnline();
// Process incoming messages
@@ -140,10 +140,10 @@ public class Client implements Closeable {
receiver.registerProcessor(MessageStatusChangeEvent.class, new MessageStatusChangeEventProcessor());
// Process user status changes
receiver.registerProcessor(UserStatusChangeEvent.class, new UserStatusChangeProcessor(localDb));
receiver.registerProcessor(UserStatusChangeEvent.class, new UserStatusChangeProcessor(localDB));
// Process message ID generation
receiver.registerProcessor(IdGenerator.class, localDb::setIdGenerator);
receiver.registerProcessor(IdGenerator.class, localDB::setIdGenerator);
// Process contact searches
receiver.registerProcessor(ContactSearchResult.class, EventBus.getInstance()::dispatch);
@@ -161,19 +161,19 @@ public class Client implements Closeable {
});
// Request a generator if none is present or the existing one is consumed
if (!localDb.hasIdGenerator() || !localDb.getIdGenerator().hasNext()) requestIdGenerator();
if (!localDB.hasIdGenerator() || !localDB.getIdGenerator().hasNext()) requestIdGenerator();
}
/**
* Creates a new write proxy that uses this client to communicate with the
* server.
*
* @param localDb the local database that the write proxy will use to access
* @param localDB the local database that the write proxy will use to access
* caches
* @return a new write proxy
* @since Envoy Client v0.3-alpha
*/
public WriteProxy createWriteProxy(LocalDb localDb) { return new WriteProxy(this, localDb); }
public WriteProxy createWriteProxy(LocalDB localDB) { return new WriteProxy(this, localDB); }
/**
* Sends a message to the server. The message's status will be incremented once