Add Connection.isConnected()Z API.

Idea from kamcio96 in #1693
This commit is contained in:
md_5
2016-01-16 12:25:01 +11:00
parent 841c81cdc4
commit e556fd7150
4 changed files with 31 additions and 8 deletions

View File

@@ -51,6 +51,14 @@ public interface Connection
*/
void disconnect(BaseComponent reason);
/**
* Gets whether this connection is currently open, ie: not disconnected, and
* able to send / receive data.
*
* @return current connection status
*/
boolean isConnected();
/**
* Get the unsafe methods of this class.
*