Known Indirect Subclasses |
This interface is deprecated.
Use ChannelClient.ChannelCallback
.
A listener which will be notified on changes to channels.
Constant Summary
Public Method Summary
abstract void |
onChannelClosed(Channel
channel, int closeReason, int appSpecificErrorCode)
Called when a channel is closed.
|
abstract void | |
abstract void |
onInputClosed(Channel
channel, int closeReason, int appSpecificErrorCode)
Called when the input side of a channel is closed.
|
abstract void |
onOutputClosed(Channel
channel, int closeReason, int appSpecificErrorCode)
Called when the output side of a channel is closed.
|
Constants
public static final int CLOSE_REASON_CONNECTION_TIMEOUT
Value passed to
onChannelClosed(Channel, int, int)
,
onInputClosed(Channel, int, int)
and
onOutputClosed(Channel, int, int)
when the stream is closed due to data
transmission timing out.
public static final int CLOSE_REASON_DISCONNECTED
Value passed to
onChannelClosed(Channel, int, int)
,
onInputClosed(Channel, int, int)
and
onOutputClosed(Channel, int, int)
when the closing is due to a remote node
being disconnected.
public static final int CLOSE_REASON_LOCAL_CLOSE
Value passed to
onChannelClosed(Channel, int, int)
,
onInputClosed(Channel, int, int)
and
onOutputClosed(Channel, int, int)
when the stream is closed due to the local
node calling
Channel.close(GoogleApiClient)
or
Channel.close(GoogleApiClient, int)
or due to the termination/crash of local
node's stream binder process.
public static final int CLOSE_REASON_NORMAL
Value passed to
onInputClosed(Channel, int, int)
or
onOutputClosed(Channel, int, int)
(but not
onChannelClosed(Channel, int, int)
), when the stream was closed under normal
conditions, for instance the whole file was read, or the OutputStream
on the remote node was closed normally.
public static final int CLOSE_REASON_REMOTE_CLOSE
Value passed to
onChannelClosed(Channel, int, int)
,
onInputClosed(Channel, int, int)
and
onOutputClosed(Channel, int, int)
when the stream is closed due to the
remote node calling
Channel.close(GoogleApiClient)
or
Channel.close(GoogleApiClient, int)
.
Public Methods
public abstract void onChannelClosed (Channel channel, int closeReason, int appSpecificErrorCode)
Called when a channel is closed. This can happen through an explicit call to
Channel.close(GoogleApiClient)
or
Channel.close(GoogleApiClient, int)
on either side of the connection, or due
to disconnecting from the remote node.
Parameters
channel | |
---|---|
closeReason | the reason for the channel closing. One of
CLOSE_REASON_DISCONNECTED ,
CLOSE_REASON_REMOTE_CLOSE ,
CLOSE_REASON_LOCAL_CLOSE , or
CLOSE_REASON_CONNECTION_TIMEOUT |
appSpecificErrorCode | the error code specified on
Channel.close(GoogleApiClient) , or 0 if closeReason is
CLOSE_REASON_DISCONNECTED or
CLOSE_REASON_CONNECTION_TIMEOUT . |
public abstract void onChannelOpened (Channel channel)
Called when a new channel is opened by a remote node.
public abstract void onInputClosed (Channel channel, int closeReason, int appSpecificErrorCode)
Called when the input side of a channel is closed.
Parameters
channel | |
---|---|
closeReason | the reason for the input closing. One of
CLOSE_REASON_DISCONNECTED ,
CLOSE_REASON_REMOTE_CLOSE ,
CLOSE_REASON_LOCAL_CLOSE ,
CLOSE_REASON_NORMAL , or
CLOSE_REASON_CONNECTION_TIMEOUT |
appSpecificErrorCode | the error code specified on
Channel.close(GoogleApiClient) , or 0 if closeReason is
CLOSE_REASON_DISCONNECTED ,
CLOSE_REASON_NORMAL , or
CLOSE_REASON_CONNECTION_TIMEOUT . |
public abstract void onOutputClosed (Channel channel, int closeReason, int appSpecificErrorCode)
Called when the output side of a channel is closed.
Parameters
channel | |
---|---|
closeReason | the reason for the output closing. One of
CLOSE_REASON_DISCONNECTED ,
CLOSE_REASON_REMOTE_CLOSE ,
CLOSE_REASON_LOCAL_CLOSE ,
CLOSE_REASON_NORMAL , or
CLOSE_REASON_CONNECTION_TIMEOUT |
appSpecificErrorCode | the error code specified on
Channel.close(GoogleApiClient) , or 0 if closeReason is
CLOSE_REASON_DISCONNECTED ,
CLOSE_REASON_NORMAL , or
CLOSE_REASON_CONNECTION_TIMEOUT . |