ChannelApi.CloseReason
Inherited Method Summary
From interface java.lang.annotation.Annotation
abstract Class<? extends Annotation>
|
annotationType()
|
abstract boolean |
|
abstract int |
hashCode()
|
abstract String
|
toString()
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[null,null,["Last updated 2024-10-31 UTC."],[[["`ChannelApi.CloseReason` is an annotation used for values passed to methods in `ChannelApi.ChannelListener`, indicating why a channel closed."],["Annotated method parameters will always be one of the predefined `CLOSE_REASON` constants, such as `CLOSE_REASON_DISCONNECTED` or `CLOSE_REASON_NORMAL`."],["This annotation helps developers understand the reason for channel closure and handle it accordingly within their Wear OS applications."],["`ChannelApi.CloseReason` inherits methods from `java.lang.annotation.Annotation`, like `annotationType()`, `equals()`, `hashCode()`, and `toString()`."]]],["`ChannelApi.CloseReason` is an annotation used with `ChannelApi.ChannelListener` methods, specifically `onChannelClosed`. Annotated parameters receive one of five predefined values indicating the reason for channel closure. These values are `CLOSE_REASON_DISCONNECTED`, `CLOSE_REASON_NORMAL`, `CLOSE_REASON_LOCAL_CLOSE`, `CLOSE_REASON_REMOTE_CLOSE`, and `CLOSE_REASON_CONNECTION_TIMEOUT`. This annotation, implementing the `Annotation` interface, also includes inherited methods such as `annotationType()`, `equals()`, `hashCode()`, and `toString()`.\n"]]