1 /**
2 *Copyright [2009-2010] [dennis zhuang(killme2008@gmail.com)]
3 *Licensed under the Apache License, Version 2.0 (the "License");
4 *you may not use this file except in compliance with the License.
5 *You may obtain a copy of the License at
6 * http://www.apache.org/licenses/LICENSE-2.0
7 *Unless required by applicable law or agreed to in writing,
8 *software distributed under the License is distributed on an "AS IS" BASIS,
9 *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
10 *either express or implied. See the License for the specific language governing permissions and limitations under the License
11 */
12 /**
13 *Copyright [2009-2010] [dennis zhuang(killme2008@gmail.com)]
14 *Licensed under the Apache License, Version 2.0 (the "License");
15 *you may not use this file except in compliance with the License.
16 *You may obtain a copy of the License at
17 * http://www.apache.org/licenses/LICENSE-2.0
18 *Unless required by applicable law or agreed to in writing,
19 *software distributed under the License is distributed on an "AS IS" BASIS,
20 *WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
21 *either express or implied. See the License for the specific language governing permissions and limitations under the License
22 */
23 package com.google.code.yanf4j.core;
24
25 /**
26 *
27 * IO Event handler
28 *
29 * @author boyan
30 *
31 */
32 public interface Handler {
33
34 public void onSessionCreated(Session session);
35
36 public void onSessionStarted(Session session);
37
38 public void onSessionClosed(Session session);
39
40 public void onMessageReceived(Session session, Object msg);
41
42 public void onMessageSent(Session session, Object msg);
43
44 public void onExceptionCaught(Session session, Throwable throwable);
45
46 public void onSessionExpired(Session session);
47
48 public void onSessionIdle(Session session);
49
50 public void onSessionConnected(Session session);
51
52 }