- java.lang.Object
-
- dev.bitbite.networking.IOHandlerListener
-
- Direct Known Subclasses:
ClientCloseListener,CommunicationHandlerCloseListener
public abstract class IOHandlerListener extends java.lang.ObjectThis class contains all functions which, if registered at the IOHandler object, will be called when certain events are happening.- See Also:
IOHandler
-
-
Constructor Summary
Constructors Constructor Description IOHandlerListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonCloseEnd()Will be called once the streams have been closedvoidonCloseFailed(java.lang.Exception exception)Will be called if an error occurs while trying to close the streamsvoidonCloseStart()Will be called before the closing of the streams is startedvoidonDataReadEnd()Will be called once the process of reading data from the inputStream endsvoidonDataReadFailed(java.lang.Exception exception)Will be called if an error occurs while trying to read data from the inputStreamvoidonDataReadStart()Will be called before the process of reading data from the inputStream is being startedvoidonWrite(byte[] args)Will be called before data is sent over the outputStreamvoidonWriteEnd()Will be called after the writing to the outputStream has been finishedvoidonWriteFailed(java.lang.Exception exception)Will be called if the writing the data to the outputStream fails
-
-
-
Method Detail
-
onDataReadStart
public void onDataReadStart()
Will be called before the process of reading data from the inputStream is being started
-
onDataReadEnd
public void onDataReadEnd()
Will be called once the process of reading data from the inputStream ends
-
onDataReadFailed
public void onDataReadFailed(java.lang.Exception exception)
Will be called if an error occurs while trying to read data from the inputStream- Parameters:
exception- which was thrown
-
onCloseStart
public void onCloseStart()
Will be called before the closing of the streams is started
-
onCloseEnd
public void onCloseEnd()
Will be called once the streams have been closed
-
onCloseFailed
public void onCloseFailed(java.lang.Exception exception)
Will be called if an error occurs while trying to close the streams- Parameters:
exception- which was thrown during the process
-
onWrite
public void onWrite(byte[] args)
Will be called before data is sent over the outputStream- Parameters:
args- which will be sent
-
onWriteEnd
public void onWriteEnd()
Will be called after the writing to the outputStream has been finished
-
onWriteFailed
public void onWriteFailed(java.lang.Exception exception)
Will be called if the writing the data to the outputStream fails- Parameters:
exception- which was thrown while trying to send the data
-
-