-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Expand file tree
/
Copy pathIEncoderExtension.java
More file actions
34 lines (29 loc) · 1.25 KB
/
IEncoderExtension.java
File metadata and controls
34 lines (29 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package org.java_websocket.extensions;
import org.java_websocket.exceptions.InvalidDataException;
import org.java_websocket.framing.Framedata;
/**
* Interface which specifies all required methods to develop a websocket extension.
*
* @since 1.3.5
*/
public interface IEncoderExtension {
/**
* Decode a frame with a extension specific algorithm. The algorithm is subject to be implemented
* by the specific extension. The resulting frame will be used in the application
*
* @param inputFrame the frame, which has do be decoded to be used in the application
* @throws InvalidDataException Throw InvalidDataException if the received frame is not correctly
* implemented by the other endpoint or there are other protocol
* errors/decoding errors
* @since 1.3.5
*/
void decodeFrame(Framedata inputFrame) throws InvalidDataException;
/**
* Encode a frame with a extension specific algorithm. The algorithm is subject to be implemented
* by the specific extension. The resulting frame will be send to the other endpoint.
*
* @param inputFrame the frame, which has do be encoded to be used on the other endpoint
* @since 1.3.5
*/
void encodeFrame(Framedata inputFrame);
}