Skip to content

Commit

Permalink
Removes unnecessary visibility/accessor modifiers
Browse files Browse the repository at this point in the history
Signed-off-by: Otavio R. Piske <angusyoung@gmail.com>
  • Loading branch information
orpiske committed Feb 20, 2019
1 parent bfe401f commit 7cb6a01
Show file tree
Hide file tree
Showing 44 changed files with 349 additions and 349 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class LiveTakeOverTest {
private static String topicPrefix;


static enum FirstClientState {
enum FirstClientState {
INITIAL,
READY,
RUNNING,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public interface IMqttActionListener {
* This method is invoked when an action has completed successfully.
* @param asyncActionToken associated with the action that has completed
*/
public void onSuccess(IMqttToken asyncActionToken );
void onSuccess(IMqttToken asyncActionToken);
/**
* This method is invoked when an action fails.
* If a client is disconnected while an action is in progress
Expand All @@ -26,5 +26,5 @@ public interface IMqttActionListener {
* @param asyncActionToken associated with the action that has failed
* @param exception thrown by the action that has failed
*/
public void onFailure(IMqttToken asyncActionToken, Throwable exception);
void onFailure(IMqttToken asyncActionToken, Throwable exception);
}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ public interface IMqttDeliveryToken extends IMqttToken {
* @return the message associated with this token or null if already delivered.
* @throws MqttException if there was a problem completing retrieving the message
*/
public MqttMessage getMessage() throws MqttException;
MqttMessage getMessage() throws MqttException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ public interface IMqttMessageListener {
* @throws Exception if a terminal error has occurred, and the client should be
* shut down.
*/
public void messageArrived(String topic, MqttMessage message) throws Exception;
void messageArrived(String topic, MqttMessage message) throws Exception;
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public interface IMqttToken {
* @throws MqttException if there was a problem with the action associated with the token.
* @see #waitForCompletion(long)
*/
public void waitForCompletion() throws MqttException;
void waitForCompletion() throws MqttException;

/**
* Blocks the current thread until the action this token is associated with has
Expand All @@ -61,7 +61,7 @@ public interface IMqttToken {
* @param timeout the maximum amount of time to wait for, in milliseconds.
* @throws MqttException if there was a problem with the action associated with the token.
*/
public void waitForCompletion(long timeout) throws MqttException;
void waitForCompletion(long timeout) throws MqttException;

/**
* Returns whether or not the action has finished.
Expand All @@ -71,7 +71,7 @@ public interface IMqttToken {
* </p>
* @return whether or not the action has finished.
*/
public boolean isComplete();
boolean isComplete();

/**
* Returns an exception providing more detail if an operation failed.
Expand All @@ -82,7 +82,7 @@ public interface IMqttToken {
* @return exception may return an exception if the operation failed. Null will be
* returned while action is in progress and if action completes successfully.
*/
public MqttException getException();
MqttException getException();

/**
* Register a listener to be notified when an action completes.
Expand All @@ -91,20 +91,20 @@ public interface IMqttToken {
* </p>
* @param listener to be invoked once the action completes
*/
public void setActionCallback(IMqttActionListener listener);
void setActionCallback(IMqttActionListener listener);

/**
* Return the async listener for this token.
* @return listener that is set on the token or null if a listener is not registered.
*/
public IMqttActionListener getActionCallback();
IMqttActionListener getActionCallback();

/**
* Returns the MQTT client that is responsible for processing the asynchronous
* action
* @return the client
*/
public IMqttAsyncClient getClient();
IMqttAsyncClient getClient();

/**
* Returns the topic string(s) for the action being tracked by this
Expand All @@ -113,7 +113,7 @@ public interface IMqttToken {
*
* @return the topic string(s) for the subscribe being tracked by this token or null
*/
public String[] getTopics();
String[] getTopics();

/**
* Store some context associated with an action.
Expand All @@ -123,7 +123,7 @@ public interface IMqttToken {
* actions</p>
* @param userContext to associate with an action
*/
public void setUserContext(Object userContext);
void setUserContext(Object userContext);

/**
* Retrieve the context associated with an action.
Expand All @@ -133,7 +133,7 @@ public interface IMqttToken {
* @return Object context associated with an action or null if there is none.
*/
public Object getUserContext();
Object getUserContext();

/**
* Returns the message ID of the message that is associated with the token.
Expand All @@ -143,21 +143,21 @@ public interface IMqttToken {
* the MQTT message id flowed over the network.
* @return the message ID of the message that is associated with the token
*/
public int getMessageId();
int getMessageId();

/**
* @return the granted QoS list from a suback
*/
public int[] getGrantedQos();
int[] getGrantedQos();

/**
* @return the session present flag from a connack
*/
public boolean getSessionPresent();
boolean getSessionPresent();

/**
* @return the response wire message
*/
public MqttWireMessage getResponse();
MqttWireMessage getResponse();

}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public interface MqttCallback {
*
* @param cause the reason behind the loss of connection.
*/
public void connectionLost(Throwable cause);
void connectionLost(Throwable cause);

/**
* This method is called when a message arrives from the server.
Expand Down Expand Up @@ -62,7 +62,7 @@ public interface MqttCallback {
* @throws Exception if a terminal error has occurred, and the client should be
* shut down.
*/
public void messageArrived(String topic, MqttMessage message) throws Exception;
void messageArrived(String topic, MqttMessage message) throws Exception;

/**
* Called when delivery for a message has been completed, and all
Expand All @@ -74,6 +74,6 @@ public interface MqttCallback {
*
* @param token the delivery token associated with the message.
*/
public void deliveryComplete(IMqttDeliveryToken token);
void deliveryComplete(IMqttDeliveryToken token);

}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ public interface MqttCallbackExtended extends MqttCallback {
* @param reconnect If true, the connection was the result of automatic reconnect.
* @param serverURI The server URI that the connection was made to.
*/
public void connectComplete(boolean reconnect, String serverURI);
void connectComplete(boolean reconnect, String serverURI);

}
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,14 @@ public interface MqttClientPersistence extends AutoCloseable {
* @param serverURI The connection string as specified when the MQTT client instance was created.
* @throws MqttPersistenceException if there was a problem opening the persistent store.
*/
public void open(String clientId, String serverURI) throws MqttPersistenceException;
void open(String clientId, String serverURI) throws MqttPersistenceException;

/**
* Close the persistent store that was previously opened.
* This will be called when a client application disconnects from the broker.
* @throws MqttPersistenceException if an error occurs closing the persistence store.
*/
public void close() throws MqttPersistenceException;
*/
void close() throws MqttPersistenceException;

/**
* Puts the specified data into the persistent store.
Expand All @@ -61,7 +61,7 @@ public interface MqttClientPersistence extends AutoCloseable {
* @throws MqttPersistenceException if there was a problem putting the data
* into the persistent store.
*/
public void put(String key, MqttPersistable persistable) throws MqttPersistenceException;
void put(String key, MqttPersistable persistable) throws MqttPersistenceException;

/**
* Gets the specified data out of the persistent store.
Expand All @@ -70,33 +70,33 @@ public interface MqttClientPersistence extends AutoCloseable {
* @throws MqttPersistenceException if there was a problem getting the data
* from the persistent store.
*/
public MqttPersistable get(String key) throws MqttPersistenceException;
MqttPersistable get(String key) throws MqttPersistenceException;

/**
* Remove the data for the specified key.
* @param key The key for the data to remove
* @throws MqttPersistenceException if there was a problem removing the data.
*/
public void remove(String key) throws MqttPersistenceException;
void remove(String key) throws MqttPersistenceException;

/**
* Returns an Enumeration over the keys in this persistent data store.
* @return an enumeration of {@link String} objects.
* @throws MqttPersistenceException if there was a problem getting they keys
*/
public Enumeration keys() throws MqttPersistenceException;
Enumeration keys() throws MqttPersistenceException;

/**
* Clears persistence, so that it no longer contains any persisted data.
* @throws MqttPersistenceException if there was a problem clearing all data from the persistence store
*/
public void clear() throws MqttPersistenceException;
void clear() throws MqttPersistenceException;

/**
* Returns whether or not data is persisted using the specified key.
* @param key the key for data, which was used when originally saving it.
* @return True if the persistence store contains the key
* @throws MqttPersistenceException if there was a problem checking whether they key existed.
*/
public boolean containsKey(String key) throws MqttPersistenceException;
boolean containsKey(String key) throws MqttPersistenceException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,22 +59,22 @@ public interface MqttPersistable {
* @return the header bytes.
* @throws MqttPersistenceException if an error occurs getting the Header Bytes
*/
public byte[] getHeaderBytes() throws MqttPersistenceException;
byte[] getHeaderBytes() throws MqttPersistenceException;

/**
* Returns the length of the header.
* @return the header length
* @throws MqttPersistenceException if an error occurs getting the Header length
*/
public int getHeaderLength() throws MqttPersistenceException;
int getHeaderLength() throws MqttPersistenceException;

/**
* Returns the offset of the header within the byte array returned by {@link #getHeaderBytes()}.
* @return the header offset.
* @throws MqttPersistenceException if an error occurs getting the Header offset
*
*/
public int getHeaderOffset() throws MqttPersistenceException;
int getHeaderOffset() throws MqttPersistenceException;

/**
* Returns the payload bytes in an array.
Expand All @@ -83,20 +83,20 @@ public interface MqttPersistable {
* @return the payload bytes.
* @throws MqttPersistenceException if an error occurs getting the Payload Bytes
*/
public byte[] getPayloadBytes() throws MqttPersistenceException;
byte[] getPayloadBytes() throws MqttPersistenceException;

/**
* Returns the length of the payload.
* @return the payload length.
* @throws MqttPersistenceException if an error occurs getting the Payload length
*/
public int getPayloadLength() throws MqttPersistenceException;
int getPayloadLength() throws MqttPersistenceException;

/**
* Returns the offset of the payload within the byte array returned by {@link #getPayloadBytes()}.
* @return the payload offset.
* @throws MqttPersistenceException if an error occurs getting the Payload Offset
*
*/
public int getPayloadOffset() throws MqttPersistenceException;
int getPayloadOffset() throws MqttPersistenceException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,22 @@ public interface MqttPingSender {
* Initial method. Pass interal state of current client in.
* @param comms The core of the client, which holds the state information for pending and in-flight messages.
*/
public void init(ClientComms comms);
void init(ClientComms comms);

/**
* Start ping sender. It will be called after connection is success.
*/
public void start();
void start();

/**
* Stop ping sender. It is called if there is any errors or connection shutdowns.
*/
public void stop();
void stop();

/**
* Schedule next ping in certain delay.
* @param delayInMilliseconds delay in milliseconds.
*/
public void schedule(long delayInMilliseconds);
void schedule(long delayInMilliseconds);

}
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
* classes being present.
*/
public interface DestinationProvider {
public MqttTopic getTopic(String topic);
MqttTopic getTopic(String topic);
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@

public interface IDisconnectedBufferCallback {

public void publishBufferedMessage(BufferedMessage bufferedMessage) throws MqttException;
void publishBufferedMessage(BufferedMessage bufferedMessage) throws MqttException;

}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public interface NetworkModule {
* @throws IOException of any underlaying transport
* @throws MqttException if the server connection cannot be established, e.g. the connection is being refused
*/
public void start() throws IOException, MqttException;
void start() throws IOException, MqttException;

/**
* Returns the input stream to be used for receiving messages. This method is usually called once directly after
Expand All @@ -72,7 +72,7 @@ public interface NetworkModule {
* @throws IOException if an I/O error occurs when creating the input stream or the broker connection is not
* established
*/
public InputStream getInputStream() throws IOException;
InputStream getInputStream() throws IOException;

/**
* Returns the output stream to be used for sending messages. This method is usually called once directly after
Expand All @@ -83,7 +83,7 @@ public interface NetworkModule {
* @throws IOException if an I/O error occurs when creating the output stream or the broker connection is not
* established
*/
public OutputStream getOutputStream() throws IOException;
OutputStream getOutputStream() throws IOException;

/**
* Close the transport to the broker. The streams provided by {@link #getInputStream()} and
Expand All @@ -93,12 +93,12 @@ public interface NetworkModule {
*
* @throws IOException if an I/O error occurs when closing the transport
*/
public void stop() throws IOException;
void stop() throws IOException;

/**
* Returns the URI of the broker which was used to create this NetworkModule.
*
* @return the URI of the broker
*/
public String getServerURI();
String getServerURI();
}
Loading

0 comments on commit 7cb6a01

Please sign in to comment.