Encoder (Java(TM) EE 7 Specification APIs) (original) (raw)


public interface Encoder
The Encoder interface defines how developers can provide a way to convert their custom objects into web socket messages. The Encoder interface contains subinterfaces that allow encoding algorithms to encode custom objects to: text, binary data, character stream and write to an output stream. The websocket implementation creates a new instance of the encoder per endpoint instance per connection. This means that each encoder instance has at most one calling thread at a time. The lifecycle of the Encoder instance is governed by the container calls to theinit(javax.websocket.EndpointConfig) and destroy() methods.
Author:
dannycoward

Copyright © 1996-2015, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.