Skip to content

Fix Docs CI #314

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ enum Phase {
CONNECTED,
CLOSING
};

Phase connectionPhase;
ClientConnection connection;
Throwable closeReason;
boolean onConnectCalled;

protected ConnectionState(Phase phase, ClientConnection connection) {
this.connectionPhase = phase;
this.connection = connection;
Expand Down Expand Up @@ -62,7 +62,7 @@ protected String getVersionString() {

/**
* Connects to the event stream RPC server asynchronously
*
*
* @return
*/
public CompletableFuture<Void> connect(final LifecycleHandler lifecycleHandler) {
Expand Down Expand Up @@ -143,7 +143,7 @@ protected void onProtocolMessage(List<Header> headers, byte[] payload, MessageTy
LOGGER.warning("AccessDenied to event stream RPC server");
connectionState.connectionPhase = ConnectionState.Phase.CLOSING;
connectionState.connection.closeConnection(0);

final AccessDeniedException ade = new AccessDeniedException("Connection access denied to event stream RPC server");
if (!initialConnectFuture.isDone()) {
initialConnectFuture.completeExceptionally(ade);
Expand All @@ -166,7 +166,7 @@ protected void onProtocolMessage(List<Header> headers, byte[] payload, MessageTy
disconnect();
} else if (MessageType.ProtocolError.equals(messageType) || MessageType.ServerError.equals(messageType)) {
LOGGER.severe("Received " + messageType.name() + ": " + CRT.awsErrorName(CRT.awsLastError()));
connectionState.closeReason = EventStreamError.create(headers, payload, messageType);
connectionState.closeReason = EventStreamError.create(headers, payload, messageType);
doOnError(lifecycleHandler, connectionState.closeReason);
disconnect();
} else {
Expand Down Expand Up @@ -344,7 +344,7 @@ public interface LifecycleHandler {
* result in closing the connection. AccessDeniedException is such an example
*
* @param t Exception
* @returns true if the connection should be terminated as a result of handling the error
* @return true if the connection should be terminated as a result of handling the error
*/
boolean onError(Throwable t);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ public static AwsIotMqttConnectionBuilder newMtlsCustomKeyOperationsBuilder(TlsC
return new AwsIotMqttConnectionBuilder(tlsContextOptions);
}
}
/**

/**
* Create a new builder with mTLS, using a certificate in a Windows certificate store.
*
* NOTE: Windows only
Expand Down Expand Up @@ -550,7 +550,7 @@ private String addUsernameParameter(String inputString, String parameterValue, S
* @param authorizerSignature The signature of the custom authorizer. If null is passed, then 'x-amz-customauthorizer-signature'
* will not be added with the MQTT connection.
* @param password The password to use with the custom authorizer. If null is passed, then no password will be set.
* @return
* @return {@link AwsIotMqttConnectionBuilder}
*/
public AwsIotMqttConnectionBuilder withCustomAuthorizer(String username, String authorizerName, String authorizerSignature, String password) {
isUsingCustomAuthorizer = true;
Expand Down