001/*
002 * Copyright (C) 2015-2017 Neo Visionaries Inc.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package NeoVisionaries.WebSockets;
017
018
019import java.util.List;
020import java.util.Map;
021
022
023/**
024 * An empty implementation of {@link WebSocketListener} interface.
025 * 
026 * <EMBED CLASS='external-html' DATA-FILE-ID=LICENSE>
027 *
028 * @see WebSocketListener
029 */
030public class WebSocketAdapter implements WebSocketListener
031{
032    @Override
033    public void onStateChanged(WebSocket websocket, WebSocketState newState) throws Exception
034    {
035    }
036
037
038    @Override
039    public void onConnected(WebSocket websocket, Map<String, List<String>> headers) throws Exception
040    {
041    }
042
043
044    @Override
045    public void onConnectError(WebSocket websocket, WebSocketException exception) throws Exception
046    {
047    }
048
049
050    @Override
051    public void onDisconnected(WebSocket websocket,
052        WebSocketFrame serverCloseFrame, WebSocketFrame clientCloseFrame,
053        boolean closedByServer) throws Exception
054    {
055    }
056
057
058    @Override
059    public void onFrame(WebSocket websocket, WebSocketFrame frame) throws Exception
060    {
061    }
062
063
064    @Override
065    public void onContinuationFrame(WebSocket websocket, WebSocketFrame frame) throws Exception
066    {
067    }
068
069
070    @Override
071    public void onTextFrame(WebSocket websocket, WebSocketFrame frame) throws Exception
072    {
073    }
074
075
076    @Override
077    public void onBinaryFrame(WebSocket websocket, WebSocketFrame frame) throws Exception
078    {
079    }
080
081
082    @Override
083    public void onCloseFrame(WebSocket websocket, WebSocketFrame frame) throws Exception
084    {
085    }
086
087
088    @Override
089    public void onPingFrame(WebSocket websocket, WebSocketFrame frame) throws Exception
090    {
091    }
092
093
094    @Override
095    public void onPongFrame(WebSocket websocket, WebSocketFrame frame) throws Exception
096    {
097    }
098
099
100    @Override
101    public void onTextMessage(WebSocket websocket, String text) throws Exception
102    {
103    }
104
105
106    @Override
107    public void onTextMessage(WebSocket websocket, byte[] data) throws Exception
108    {
109    }
110
111
112    @Override
113    public void onBinaryMessage(WebSocket websocket, byte[] binary) throws Exception
114    {
115    }
116
117
118    @Override
119    public void onSendingFrame(WebSocket websocket, WebSocketFrame frame) throws Exception
120    {
121    }
122
123
124    @Override
125    public void onFrameSent(WebSocket websocket, WebSocketFrame frame) throws Exception
126    {
127    }
128
129
130    @Override
131    public void onFrameUnsent(WebSocket websocket, WebSocketFrame frame) throws Exception
132    {
133    }
134
135
136    @Override
137    public void onError(WebSocket websocket, WebSocketException cause) throws Exception
138    {
139    }
140
141
142    @Override
143    public void onFrameError(WebSocket websocket, WebSocketException cause, WebSocketFrame frame) throws Exception
144    {
145    }
146
147
148    @Override
149    public void onMessageError(WebSocket websocket, WebSocketException cause, List<WebSocketFrame> frames) throws Exception
150    {
151    }
152
153
154    @Override
155    public void onMessageDecompressionError(WebSocket websocket, WebSocketException cause, byte[] compressed) throws Exception
156    {
157    }
158
159
160    @Override
161    public void onTextMessageError(WebSocket websocket, WebSocketException cause, byte[] data) throws Exception
162    {
163    }
164
165
166    @Override
167    public void onSendError(WebSocket websocket, WebSocketException cause, WebSocketFrame frame) throws Exception
168    {
169    }
170
171
172    @Override
173    public void onUnexpectedError(WebSocket websocket, WebSocketException cause) throws Exception
174    {
175    }
176
177
178    @Override
179    public void handleCallbackError(WebSocket websocket, Throwable cause) throws Exception
180    {
181    }
182
183
184    @Override
185    public void onSendingHandshake(WebSocket websocket, String requestLine, List<String[]> headers) throws Exception
186    {
187    }
188
189
190    @Override
191    public void onThreadCreated(WebSocket websocket, ThreadType threadType, Thread thread) throws Exception
192    {
193    }
194
195
196    @Override
197    public void onThreadStarted(WebSocket websocket, ThreadType threadType, Thread thread) throws Exception
198    {
199    }
200
201
202    @Override
203    public void onThreadStopping(WebSocket websocket, ThreadType threadType, Thread thread) throws Exception
204    {
205    }
206}