Skip to content

Commit 24da370

Browse files
Huge cleanup, ready for release
1 parent f948c53 commit 24da370

File tree

7 files changed

+29
-33
lines changed

7 files changed

+29
-33
lines changed

.gitignore

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
*.iml
22
.gradle
33
/local.properties
4-
/.idea/workspace.xml
5-
/.idea/libraries
6-
/.idea/misc.xml
7-
/.idea/modules.xml
8-
/.idea/vcs.xml
4+
.idea
95
.DS_Store
106
/build
11-
/captures
7+
/captures

example-client/src/main/AndroidManifest.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
package="ua.naiksoftware.stompclientexample">
3+
package="ua.naiksoftware.stompclientexample">
44

5-
<uses-permission android:name="android.permission.INTERNET"/>
5+
<uses-permission android:name="android.permission.INTERNET" />
66

77
<application
8-
android:allowBackup="true"
9-
android:icon="@mipmap/ic_launcher"
10-
android:label="@string/app_name"
11-
android:supportsRtl="true"
12-
android:theme="@style/AppTheme">
8+
android:allowBackup="true"
9+
android:icon="@mipmap/ic_launcher"
10+
android:label="@string/app_name"
11+
android:supportsRtl="true"
12+
android:theme="@style/AppTheme">
1313
<activity android:name="ua.naiksoftware.stompclientexample.MainActivity">
1414
<intent-filter>
15-
<action android:name="android.intent.action.MAIN"/>
15+
<action android:name="android.intent.action.MAIN" />
1616

17-
<category android:name="android.intent.category.LAUNCHER"/>
17+
<category android:name="android.intent.category.LAUNCHER" />
1818
</intent-filter>
1919
</activity>
2020
</application>

example-client/src/test/java/ua/naiksoftware/stompclientexample/ExampleUnitTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import org.junit.Test;
44

5-
import static org.junit.Assert.*;
5+
import static org.junit.Assert.assertEquals;
66

77
/**
88
* To work on unit tests, switch the Test Artifact in the Build Variants view.

lib/src/main/AndroidManifest.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2-
package="ua.naiksoftware.stomp">
1+
<manifest package="ua.naiksoftware.stomp">
32

4-
<application/>
3+
<application />
54

65
</manifest>

lib/src/main/java/ua/naiksoftware/stomp/Stomp.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@
1010

1111
/**
1212
* Supported overlays:
13-
* - org.java_websocket.WebSocket ('org.java-websocket:Java-WebSocket:1.3.2')
14-
* - okhttp3.WebSocket ('com.squareup.okhttp3:okhttp:3.8.1')
15-
*
16-
* You can add own relay, just implement ConnectionProvider for you stomp transport,
17-
* such as web socket.
18-
*
13+
* - org.java_websocket.WebSocket ('org.java-websocket:Java-WebSocket:1.3.2')
14+
* - okhttp3.WebSocket ('com.squareup.okhttp3:okhttp:3.8.1')
15+
* <p>
16+
* You can add own relay, just implement ConnectionProvider for you stomp transport,
17+
* such as web socket.
18+
* <p>
1919
* Created by naik on 05.05.16.
2020
*/
2121
public class Stomp {
@@ -25,9 +25,8 @@ public static StompClient over(@NonNull ConnectionProvider connectionProvider, S
2525
}
2626

2727
/**
28-
*
2928
* @param connectionProvider connectionProvider method
30-
* @param uri URI to connect
29+
* @param uri URI to connect
3130
* @param connectHttpHeaders HTTP headers, will be passed with handshake query, may be null
3231
* @return StompClient for receiving and sending messages. Call #StompClient.connect
3332
*/
@@ -38,13 +37,14 @@ public static StompClient over(@NonNull ConnectionProvider connectionProvider, S
3837
/**
3938
* {@code webSocketClient} can accept the following type of clients:
4039
* <ul>
41-
* <li>{@code org.java_websocket.WebSocket}: cannot accept an existing client</li>
42-
* <li>{@code okhttp3.WebSocket}: can accept a non-null instance of {@code okhttp3.OkHttpClient}</li>
40+
* <li>{@code org.java_websocket.WebSocket}: cannot accept an existing client</li>
41+
* <li>{@code okhttp3.WebSocket}: can accept a non-null instance of {@code okhttp3.OkHttpClient}</li>
4342
* </ul>
43+
*
4444
* @param connectionProvider connectionProvider method
45-
* @param uri URI to connect
45+
* @param uri URI to connect
4646
* @param connectHttpHeaders HTTP headers, will be passed with handshake query, may be null
47-
* @param okHttpClient Existing client that will be used to open the WebSocket connection, may be null to use default client
47+
* @param okHttpClient Existing client that will be used to open the WebSocket connection, may be null to use default client
4848
* @return StompClient for receiving and sending messages. Call #StompClient.connect
4949
*/
5050
public static StompClient over(@NonNull ConnectionProvider connectionProvider, String uri, @Nullable Map<String, String> connectHttpHeaders, @Nullable OkHttpClient okHttpClient) {

lib/src/main/java/ua/naiksoftware/stomp/WebSocketsConnectionProvider.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class WebSocketsConnectionProvider extends AbstractConnectionProvider {
3838

3939
/**
4040
* Support UIR scheme ws://host:port/path
41+
*
4142
* @param connectHttpHeaders may be null
4243
*/
4344
WebSocketsConnectionProvider(String uri, @Nullable Map<String, String> connectHttpHeaders) {
@@ -97,7 +98,7 @@ public void onError(Exception ex) {
9798
}
9899
};
99100

100-
if(mUri.startsWith("wss")) {
101+
if (mUri.startsWith("wss")) {
101102
try {
102103
SSLContext sc = SSLContext.getInstance("TLS");
103104
sc.init(null, null, null);

lib/src/test/java/ua/naiksoftware/stomp/ExampleUnitTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import org.junit.Test;
44

5-
import static org.junit.Assert.*;
5+
import static org.junit.Assert.assertEquals;
66

77
/**
88
* To work on unit tests, switch the Test Artifact in the Build Variants view.

0 commit comments

Comments
 (0)