@@ -28,12 +28,12 @@ enum Phase {
28
28
CONNECTED ,
29
29
CLOSING
30
30
};
31
-
31
+
32
32
Phase connectionPhase ;
33
33
ClientConnection connection ;
34
34
Throwable closeReason ;
35
35
boolean onConnectCalled ;
36
-
36
+
37
37
protected ConnectionState (Phase phase , ClientConnection connection ) {
38
38
this .connectionPhase = phase ;
39
39
this .connection = connection ;
@@ -62,7 +62,7 @@ protected String getVersionString() {
62
62
63
63
/**
64
64
* Connects to the event stream RPC server asynchronously
65
- *
65
+ *
66
66
* @return
67
67
*/
68
68
public CompletableFuture <Void > connect (final LifecycleHandler lifecycleHandler ) {
@@ -143,7 +143,7 @@ protected void onProtocolMessage(List<Header> headers, byte[] payload, MessageTy
143
143
LOGGER .warning ("AccessDenied to event stream RPC server" );
144
144
connectionState .connectionPhase = ConnectionState .Phase .CLOSING ;
145
145
connectionState .connection .closeConnection (0 );
146
-
146
+
147
147
final AccessDeniedException ade = new AccessDeniedException ("Connection access denied to event stream RPC server" );
148
148
if (!initialConnectFuture .isDone ()) {
149
149
initialConnectFuture .completeExceptionally (ade );
@@ -166,7 +166,7 @@ protected void onProtocolMessage(List<Header> headers, byte[] payload, MessageTy
166
166
disconnect ();
167
167
} else if (MessageType .ProtocolError .equals (messageType ) || MessageType .ServerError .equals (messageType )) {
168
168
LOGGER .severe ("Received " + messageType .name () + ": " + CRT .awsErrorName (CRT .awsLastError ()));
169
- connectionState .closeReason = EventStreamError .create (headers , payload , messageType );
169
+ connectionState .closeReason = EventStreamError .create (headers , payload , messageType );
170
170
doOnError (lifecycleHandler , connectionState .closeReason );
171
171
disconnect ();
172
172
} else {
@@ -344,7 +344,7 @@ public interface LifecycleHandler {
344
344
* result in closing the connection. AccessDeniedException is such an example
345
345
*
346
346
* @param t Exception
347
- * @returns true if the connection should be terminated as a result of handling the error
347
+ * @return true if the connection should be terminated as a result of handling the error
348
348
*/
349
349
boolean onError (Throwable t );
350
350
0 commit comments