-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[linktap] Add communication timeout configuration parameter #18679
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
Changes from 14 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
217a7b6
[linktap]Communications timeout configuration
dag81 031d62d
[linktap] Cleanup of unrequired variable
dag81 5a15557
[linktap] Revert accidental removal of config code
dag81 133b761
[linktap] Remove commented out line
dag81 4c0c796
[linktap] Align const to final setting name
dag81 ead51c7
[linktap] Cleanup to use handler function
dag81 0f43f37
[linktap] Comment for magic number
dag81 1e5aa9d
[linktap] Revert i18n file
dag81 e21e3e2
[linktap] Missed call remap to single method
dag81 bf76690
[linktap] Remove unnecessary parameter addition
dag81 9264323
[linktap] Spotless apply
dag81 95a24c6
[linktap] i18n additions for new config
dag81 51b3cf5
[linktap] force push
dag81 1350d86
[linktap] adjust scope to private
dag81 79fb575
[linktap] missed renames
dag81 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
...g.linktap/src/main/java/org/openhab/binding/linktap/protocol/http/JettyTraceListener.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* | ||
* Copyright (c) 2010-2025 Contributors to the openHAB project | ||
* | ||
* See the NOTICE file(s) distributed with this work for additional | ||
* information. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0 | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*/ | ||
package org.openhab.binding.linktap.protocol.http; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
import org.eclipse.jdt.annotation.Nullable; | ||
import org.eclipse.jetty.client.api.Request; | ||
import org.slf4j.Logger; | ||
|
||
/** | ||
* The {@link JettyTraceListener} defines a basic listener that can be utilised for logging jetty client states. | ||
* | ||
* @author David Goodyear - Initial contribution | ||
*/ | ||
@NonNullByDefault | ||
public final class JettyTraceListener implements Request.Listener { | ||
|
||
private final Logger logger; | ||
|
||
public JettyTraceListener(final Logger logger) { | ||
this.logger = logger; | ||
} | ||
|
||
@Override | ||
public void onQueued(@Nullable Request request) { | ||
if (request != null) { | ||
logger.trace("HTTP Comms request is queued to be processed to {}", request.getURI()); | ||
} else { | ||
logger.trace("HTTP Comms request is queued to be processed"); | ||
} | ||
Request.Listener.super.onQueued(request); | ||
} | ||
|
||
@Override | ||
public void onBegin(@Nullable Request request) { | ||
if (request != null) { | ||
logger.trace("HTTP Comms request is beginning to be processed to {}", request.getURI()); | ||
} else { | ||
logger.trace("HTTP Comms request is beginning to be processed"); | ||
} | ||
Request.Listener.super.onBegin(request); | ||
} | ||
|
||
@Override | ||
public void onSuccess(@Nullable Request request) { | ||
if (request != null) { | ||
logger.trace("HTTP Comms request has been reported as successful to {}", request.getURI()); | ||
} else { | ||
logger.trace("HTTP Comms request has been reported as successful"); | ||
} | ||
Request.Listener.super.onSuccess(request); | ||
} | ||
|
||
@Override | ||
public void onFailure(@Nullable Request request, @Nullable Throwable failure) { | ||
if (request != null) { | ||
logger.trace("HTTP Comms request has failed {}", request.getHost()); | ||
} else { | ||
logger.trace("HTTP Comms request has failed with error"); | ||
} | ||
if (failure != null) { | ||
logger.trace("HTTP Comms request has failed due to cause {}", failure.toString()); | ||
} | ||
Request.Listener.super.onFailure(request, failure); | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.