public abstract class WsRemoteEndpointImplBase extends java.lang.Object implements RemoteEndpoint
RemoteEndpoint.Async, RemoteEndpoint.Basic| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BLOCKING_SEND_TIMEOUT_PROPERTY |
| Constructor and Description |
|---|
WsRemoteEndpointImplBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected abstract void |
doClose() |
protected abstract void |
doWrite(SendHandler handler,
java.nio.ByteBuffer... data) |
void |
flushBatch()
Flush any currently batched messages to the remote endpoint.
|
boolean |
getBatchingAllowed()
Obtains the current batching status of the endpoint.
|
java.io.OutputStream |
getSendStream() |
long |
getSendTimeout() |
java.io.Writer |
getSendWriter() |
protected abstract boolean |
isMasked() |
void |
sendBytes(java.nio.ByteBuffer data) |
void |
sendBytesByCompletion(java.nio.ByteBuffer data,
SendHandler handler) |
java.util.concurrent.Future<java.lang.Void> |
sendBytesByFuture(java.nio.ByteBuffer data) |
void |
sendObject(java.lang.Object obj) |
void |
sendObjectByCompletion(java.lang.Object obj,
SendHandler completion) |
java.util.concurrent.Future<java.lang.Void> |
sendObjectByFuture(java.lang.Object obj) |
void |
sendPartialBytes(java.nio.ByteBuffer partialByte,
boolean last) |
void |
sendPartialString(java.lang.String fragment,
boolean isLast) |
void |
sendPing(java.nio.ByteBuffer applicationData)
Send a ping message blocking until the message has been sent.
|
void |
sendPong(java.nio.ByteBuffer applicationData)
Send a pong message blocking until the message has been sent.
|
void |
sendString(java.lang.String text) |
void |
sendStringByCompletion(java.lang.String text,
SendHandler handler) |
java.util.concurrent.Future<java.lang.Void> |
sendStringByFuture(java.lang.String text) |
void |
setBatchingAllowed(boolean batchingAllowed)
Enable or disable the batching of outgoing messages for this endpoint.
|
protected void |
setEncoders(EndpointConfig endpointConfig) |
void |
setSendTimeout(long timeout) |
protected void |
setSession(WsSession wsSession) |
public static final java.lang.String BLOCKING_SEND_TIMEOUT_PROPERTY
public long getSendTimeout()
public void setSendTimeout(long timeout)
public void setBatchingAllowed(boolean batchingAllowed)
throws java.io.IOException
javax.websocket.RemoteEndpointsetBatchingAllowed in interface RemoteEndpointbatchingAllowed - New settingjava.io.IOException - If changing the value resulted in a call to
RemoteEndpoint.flushBatch() and that call threw an
IOException.public boolean getBatchingAllowed()
javax.websocket.RemoteEndpointgetBatchingAllowed in interface RemoteEndpointpublic void flushBatch()
throws java.io.IOException
javax.websocket.RemoteEndpointflushBatch in interface RemoteEndpointjava.io.IOExceptionpublic void sendBytes(java.nio.ByteBuffer data)
throws java.io.IOException
java.io.IOExceptionpublic java.util.concurrent.Future<java.lang.Void> sendBytesByFuture(java.nio.ByteBuffer data)
public void sendBytesByCompletion(java.nio.ByteBuffer data,
SendHandler handler)
public void sendPartialBytes(java.nio.ByteBuffer partialByte,
boolean last)
throws java.io.IOException
java.io.IOExceptionpublic void sendPing(java.nio.ByteBuffer applicationData)
throws java.io.IOException,
java.lang.IllegalArgumentException
javax.websocket.RemoteEndpointsendPing in interface RemoteEndpointapplicationData - The payload for the ping messagejava.io.IOExceptionjava.lang.IllegalArgumentExceptionpublic void sendPong(java.nio.ByteBuffer applicationData)
throws java.io.IOException,
java.lang.IllegalArgumentException
javax.websocket.RemoteEndpointsendPong in interface RemoteEndpointapplicationData - The payload for the pong messagejava.io.IOExceptionjava.lang.IllegalArgumentExceptionpublic void sendString(java.lang.String text)
throws java.io.IOException
java.io.IOExceptionpublic java.util.concurrent.Future<java.lang.Void> sendStringByFuture(java.lang.String text)
public void sendStringByCompletion(java.lang.String text,
SendHandler handler)
public void sendPartialString(java.lang.String fragment,
boolean isLast)
throws java.io.IOException
java.io.IOExceptionpublic java.io.OutputStream getSendStream()
public java.io.Writer getSendWriter()
public void sendObject(java.lang.Object obj)
throws java.io.IOException
java.io.IOExceptionpublic java.util.concurrent.Future<java.lang.Void> sendObjectByFuture(java.lang.Object obj)
public void sendObjectByCompletion(java.lang.Object obj,
SendHandler completion)
protected void setSession(WsSession wsSession)
protected void setEncoders(EndpointConfig endpointConfig) throws DeploymentException
DeploymentExceptionpublic final void close()
protected abstract void doWrite(SendHandler handler, java.nio.ByteBuffer... data)
protected abstract boolean isMasked()
protected abstract void doClose()
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.