java.lang.Object | |
↳ | com.google.android.gms.wearable.ChannelClient.ChannelCallback |
A callback which will be notified on changes to channels.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Called when a channel is closed.
| |||||||||||
Called when a new channel is opened by a remote node.
| |||||||||||
Called when the input side of a channel is closed.
| |||||||||||
Called when the output side of a channel is closed.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Value passed to onChannelClosed(ChannelClient.Channel, int, int)
, onInputClosed(ChannelClient.Channel, int, int)
and onOutputClosed(ChannelClient.Channel, int, int)
when the closing is due to a remote node being disconnected.
Value passed to onChannelClosed(ChannelClient.Channel, int, int)
, onInputClosed(ChannelClient.Channel, int, int)
and onOutputClosed(ChannelClient.Channel, int, int)
when the stream is closed due to the local node calling close(Channel)
or close(Channel, int)
.
Value passed to onInputClosed(ChannelClient.Channel, int, int)
or onOutputClosed(ChannelClient.Channel, int, int)
(but not onChannelClosed(ChannelClient.Channel, int, int)
), when the stream was closed under normal conditions, e.g the whole file
was read, or the OutputStream
on the remote node was closed normally.
Value passed to onChannelClosed(ChannelClient.Channel, int, int)
, onInputClosed(ChannelClient.Channel, int, int)
and onOutputClosed(ChannelClient.Channel, int, int)
when the stream is closed due to the remote node calling close(Channel)
or close(Channel, int)
.
Called when a channel is closed. This can happen through an explicit call to close(Channel)
or close(Channel, int)
on either side of
the connection, or due to disconnecting from the remote node.
Parameters | |
---|---|
channel |
ChannelClient.Channel |
closeReason |
int : the reason for the channel closing. One of CLOSE_REASON_DISCONNECTED , CLOSE_REASON_REMOTE_CLOSE , or CLOSE_REASON_LOCAL_CLOSE . |
appSpecificErrorCode |
int : the error code specified on close(GoogleApiClient) , or 0 if closeReason is CLOSE_REASON_DISCONNECTED .
|
Called when a new channel is opened by a remote node.
Parameters | |
---|---|
channel |
ChannelClient.Channel |
Called when the input side of a channel is closed.
Parameters | |
---|---|
channel |
ChannelClient.Channel |
closeReason |
int : the reason for the input closing. One of CLOSE_REASON_DISCONNECTED , CLOSE_REASON_REMOTE_CLOSE , CLOSE_REASON_LOCAL_CLOSE , or CLOSE_REASON_NORMAL |
appSpecificErrorCode |
int : the error code specified on close(GoogleApiClient) , or 0 if closeReason is CLOSE_REASON_DISCONNECTED or CLOSE_REASON_NORMAL .
|
Called when the output side of a channel is closed.
Parameters | |
---|---|
channel |
ChannelClient.Channel |
closeReason |
int : the reason for the output closing. One of CLOSE_REASON_DISCONNECTED , CLOSE_REASON_REMOTE_CLOSE , CLOSE_REASON_LOCAL_CLOSE , or CLOSE_REASON_NORMAL |
appSpecificErrorCode |
int : the error code specified on close(GoogleApiClient) , or 0 if closeReason is CLOSE_REASON_DISCONNECTED or CLOSE_REASON_NORMAL .
|