jdk/src/java.httpclient/share/classes/java/net/http/WSMessageConsumer.java
author vinnie
Mon, 15 Aug 2016 14:25:51 +0100
changeset 40276 2217f830ca7b
parent 39730 196f4e25d9f5
permissions -rw-r--r--
8163503: PKCS12 keystore cannot store non-X.509 certificates Reviewed-by: weijun, xuelei, mullan
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
37874
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
     1
/*
39730
196f4e25d9f5 8160993: Fix headers in the java/net/http package
chegar
parents: 38856
diff changeset
     2
 * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
37874
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
     4
 *
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    10
 *
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    15
 * accompanied this code).
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    16
 *
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    20
 *
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    23
 * questions.
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    24
 */
39730
196f4e25d9f5 8160993: Fix headers in the java/net/http package
chegar
parents: 38856
diff changeset
    25
37874
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    26
package java.net.http;
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    27
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    28
import java.net.http.WebSocket.CloseCode;
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    29
import java.net.http.WebSocket.MessagePart;
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    30
import java.nio.ByteBuffer;
38856
cc3a0d1e96e0 8156650: Simplify Text message support in WebSocket API
prappo
parents: 37874
diff changeset
    31
import java.nio.CharBuffer;
37874
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    32
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    33
interface WSMessageConsumer {
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    34
38856
cc3a0d1e96e0 8156650: Simplify Text message support in WebSocket API
prappo
parents: 37874
diff changeset
    35
    void onText(MessagePart part, WSShared<CharBuffer> data);
37874
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    36
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    37
    void onBinary(MessagePart part, WSShared<ByteBuffer> data);
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    38
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    39
    void onPing(WSShared<ByteBuffer> data);
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    40
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    41
    void onPong(WSShared<ByteBuffer> data);
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    42
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    43
    void onClose(CloseCode code, CharSequence reason);
02589df0999a 8087113: Websocket API and implementation
prappo
parents:
diff changeset
    44
}