public abstract class WsRemoteEndpointImplBase extends Object implements RemoteEndpoint
RemoteEndpoint.Async, RemoteEndpoint.Basic| Modifier and Type | Field and Description |
|---|---|
static 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,
ByteBuffer... data) |
void |
flushBatch()
Flush any currently batched messages to the remote endpoint.
|
boolean |
getBatchingAllowed()
Obtains the current batching status of the endpoint.
|
OutputStream |
getSendStream() |
long |
getSendTimeout() |
Writer |
getSendWriter() |
protected abstract boolean |
isMasked() |
void |
sendBytes(ByteBuffer data) |
void |
sendBytesByCompletion(ByteBuffer data,
SendHandler handler) |
Future<Void> |
sendBytesByFuture(ByteBuffer data) |
void |
sendObject(Object obj) |
void |
sendObjectByCompletion(Object obj,
SendHandler completion) |
Future<Void> |
sendObjectByFuture(Object obj) |
void |
sendPartialBytes(ByteBuffer partialByte,
boolean last) |
void |
sendPartialString(String fragment,
boolean isLast) |
void |
sendPing(ByteBuffer applicationData)
Send a ping message blocking until the message has been sent.
|
void |
sendPong(ByteBuffer applicationData)
Send a pong message blocking until the message has been sent.
|
void |
sendString(String text) |
void |
sendStringByCompletion(String text,
SendHandler handler) |
Future<Void> |
sendStringByFuture(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 String BLOCKING_SEND_TIMEOUT_PROPERTY
public long getSendTimeout()
public void setSendTimeout(long timeout)
public void setBatchingAllowed(boolean batchingAllowed)
throws IOException
javax.websocket.RemoteEndpointsetBatchingAllowed in interface RemoteEndpointbatchingAllowed - New settingIOException - 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 IOException
javax.websocket.RemoteEndpointflushBatch in interface RemoteEndpointIOExceptionpublic void sendBytes(ByteBuffer data) throws IOException
IOExceptionpublic Future<Void> sendBytesByFuture(ByteBuffer data)
public void sendBytesByCompletion(ByteBuffer data, SendHandler handler)
public void sendPartialBytes(ByteBuffer partialByte, boolean last) throws IOException
IOExceptionpublic void sendPing(ByteBuffer applicationData) throws IOException, IllegalArgumentException
javax.websocket.RemoteEndpointsendPing in interface RemoteEndpointapplicationData - The payload for the ping messageIOExceptionIllegalArgumentExceptionpublic void sendPong(ByteBuffer applicationData) throws IOException, IllegalArgumentException
javax.websocket.RemoteEndpointsendPong in interface RemoteEndpointapplicationData - The payload for the pong messageIOExceptionIllegalArgumentExceptionpublic void sendString(String text) throws IOException
IOExceptionpublic void sendStringByCompletion(String text, SendHandler handler)
public void sendPartialString(String fragment, boolean isLast) throws IOException
IOExceptionpublic OutputStream getSendStream()
public Writer getSendWriter()
public void sendObject(Object obj) throws IOException
IOExceptionpublic void sendObjectByCompletion(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, ByteBuffer... data)
protected abstract boolean isMasked()
protected abstract void doClose()
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.