Skip to content

Commit

Permalink
reformatted files
Browse files Browse the repository at this point in the history
  • Loading branch information
NehaSelvan1512 committed Sep 29, 2023
1 parent 9a34ee8 commit 9689011
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
public interface StreamMessage<T> {


T getMessage();
T getData();
}
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ private char convertUnicode( char c ) {
hexval( nextQueryChar() ));
} catch ( final IOException e ) {
throw new RuntimeException( e.getMessage() );
//throw new RuntimeException( e.getMessage(), queryCursor, queryCursorLine, queryCursorColumn );
//throw new RuntimeException( e.getData(), queryCursor, queryCursorLine, queryCursorColumn );
}
}

Expand Down
5 changes: 1 addition & 4 deletions plugins/mqtt-stream/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ dependencies {

// https://mvnrepository.com/artifact/com.hivemq/hivemq-mqtt-client
implementation group: 'com.hivemq', name: 'hivemq-mqtt-client', version: hivemq_mqttclient_version
//TODO: remove
// https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk15on
implementation group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.70'

implementation group: "org.mongodb", name: "mongodb-driver-sync", version: mongodb_driver_sync_version // Apache 2.0

Expand Down Expand Up @@ -94,7 +91,7 @@ jar {
}
}

java{
java {
withJavadocJar();
withSourcesJar();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public FilteringMqttMessage( MqttMessage mqttMessage, String query ) {


public String getMessage() {
return mqttMessage.getMessage();
return mqttMessage.getData();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public MqttMessage( String payload, String topic ) {
}


public String getMessage() {
public String getData() {
return this.payload;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -753,11 +753,9 @@ private class MonitoringPage {
private final InformationGroup informationGroupInfo;
private final InformationGroup informationGroupReceivedMessages;
private final InformationGroup informationGroupPub;
private final InformationGroup informationGroupReconn;
private final InformationTable topicsTable;
private final InformationTable messageTable;
private final InformationKeyValue brokerKv;
private final InformationAction reconnButton;
private final InformationAction msgButton;


Expand Down Expand Up @@ -797,23 +795,6 @@ public MonitoringPage() {
} ).withParameters( "topic", "payload" );
im.registerInformation( msgButton );

// Reconnection button
informationGroupReconn = new InformationGroup( informationPage, "Reconnect to broker" ).setOrder( 5 );
im.addGroup( informationGroupReconn );
reconnButton = new InformationAction( informationGroupReconn, "Reconnect", ( parameters ) -> {
String end = "Reconnecting to broker";
if ( client.getState().toString().equals( "DISCONNECTED" ) ) {
run();
update();
} else {
client.toBlocking().disconnect();
run();
update();
}
return end;
} );
im.registerInformation( reconnButton );

}


Expand Down Expand Up @@ -852,11 +833,9 @@ public void remove() {
im.removeInformation( brokerKv );
im.removeInformation( messageTable );
im.removeInformation( msgButton );
im.removeInformation( reconnButton );

im.removeGroup( informationGroupTopics );
im.removeGroup( informationGroupInfo );
im.removeGroup( informationGroupReconn );
im.removeGroup( informationGroupPub );
im.removeGroup( informationGroupReceivedMessages );
im.removePage( informationPage );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,8 @@ public class StoringMqttMessage {
private final long databaseId;
@Getter
private final int userId;
/**
* if MqttStreamClient.collectionPerTopic = TRUE, then collectionName is name of the topic or (if the subscribed topic
* has wildcards) the wildcardTopic
* if MqttStreamClient.collectionPerTopic = FALSE, then collectionName is the name of the common collection
*/

// The name of the entity where the message should be stored in.
@Getter
private final String entityName;

Expand All @@ -54,7 +51,7 @@ public StoringMqttMessage( MqttMessage msg, String namespaceName, NamespaceType


public String getMessage() {
return this.msg.getMessage();
return this.msg.getData();
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public static void printLog( Throwable t, QueryRequest request ) {


public static void attachError( Transaction transaction, List<Result> results, String query, Throwable t ) {
//String msg = t.getMessage() == null ? "" : t.getMessage();
//String msg = t.getData() == null ? "" : t.getData();
Result result = new Result( t ).setGeneratedQuery( query ).setXid( transaction.getXid().toString() );

if ( transaction.isActive() ) {
Expand Down

0 comments on commit 9689011

Please sign in to comment.