2424
2525public interface Session
2626{
27- public interface Listener
27+ interface Listener
2828 {
2929 /**
3030 * Called by framework when some data is available.
@@ -33,29 +33,29 @@ public interface Listener
3333 * limit can be less than capacity.
3434 * @param data the data received from the related socket
3535 */
36- public abstract void onDataReceived (RetainableByteBuffer data );
36+ void onDataReceived (RetainableByteBuffer data );
3737
3838 /**
3939 * Called by framework when underlying socket channel
4040 * is closed and all income data is processed.
4141 */
42- public abstract void onConnectionClosed ();
42+ void onConnectionClosed ();
4343 }
4444
4545 /**
4646 * @return Collider instance the session is linked with.
4747 */
48- public Collider getCollider ();
48+ Collider getCollider ();
4949
5050 /**
5151 * @return local socket address of the session.
5252 */
53- public SocketAddress getLocalAddress ();
53+ SocketAddress getLocalAddress ();
5454
5555 /**
5656 * @return remote socket address of the session.
5757 */
58- public SocketAddress getRemoteAddress ();
58+ SocketAddress getRemoteAddress ();
5959
6060 /**
6161 * Schedules data to be sent to the underlying socket channel.
@@ -67,19 +67,19 @@ public interface Listener
6767 * @return value greater than 0 if byte buffer is retained by the framework,
6868 * (data will be sent as soon as possible), or less than 0 if the session is closed.
6969 */
70- public int sendData ( ByteBuffer data );
71- public int sendData ( RetainableByteBuffer data );
70+ int sendData (ByteBuffer data );
71+ int sendData (RetainableByteBuffer data );
7272
7373 /**
7474 * Method makes an attempt to write data synchronously to the underlying socket channel.
7575 * It can happen if it is the single thread calling the <em>sendData</em> or <em>sendDataSync</em>.
76- * Otherwise data will sent as <em>sendData</em> would be called.
76+ * Otherwise data will be sent as <em>sendData</em> would be called.
7777 * @param data byte buffer with data to send
7878 * @return 0 if data has been written to the socket and byte buffer can be reused,
7979 * greater than 0 if byte buffer is retained by the framework, will be sent as soon as possible,
8080 * less than 0 if session is closed.
8181 */
82- public int sendDataSync ( ByteBuffer data );
82+ int sendDataSync (ByteBuffer data );
8383
8484 /**
8585 * Method to be used to close the session.
@@ -93,7 +93,7 @@ public interface Listener
9393 * @return less than 0 if session already has been closed,
9494 * otherwise amount of data waiting to be sent.
9595 */
96- public int closeConnection ();
96+ int closeConnection ();
9797
9898 /**
9999 * Replaces the current session listener with a new one.
@@ -103,7 +103,7 @@ public interface Listener
103103 * @param newListener the new listener to be used for the session
104104 * @return the previous listener was used to the session
105105 */
106- public Listener replaceListener (Listener newListener );
106+ Listener replaceListener (Listener newListener );
107107
108- public int accelerate (ShMem shMem , ByteBuffer message );
108+ int accelerate (ShMem shMem , ByteBuffer message );
109109}
0 commit comments