public abstract class WireTcpHandler<T extends NetworkContext> extends Object implements TcpHandler, NetworkContextManager<T>
| Modifier and Type | Field and Description |
|---|---|
protected net.openhft.chronicle.wire.Wire |
outWire |
| Constructor and Description |
|---|
WireTcpHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkWires(net.openhft.chronicle.bytes.Bytes in,
net.openhft.chronicle.bytes.Bytes out,
net.openhft.chronicle.wire.WireType wireType) |
void |
close() |
protected net.openhft.chronicle.wire.Wire |
initialiseInWire(net.openhft.chronicle.wire.WireType wireType,
net.openhft.chronicle.bytes.Bytes in) |
protected net.openhft.chronicle.wire.Wire |
initialiseOutWire(net.openhft.chronicle.bytes.Bytes out,
net.openhft.chronicle.wire.WireType wireType) |
boolean |
isAcceptor() |
void |
isAcceptor(boolean isAcceptor) |
T |
nc() |
void |
nc(T nc) |
protected void |
onBytesWritten() |
void |
onEndOfConnection(boolean heartbeatTimeOut) |
protected abstract void |
onInitialize() |
protected abstract void |
onRead(net.openhft.chronicle.wire.DocumentContext in,
net.openhft.chronicle.wire.WireOut out) |
protected void |
onWrite(net.openhft.chronicle.wire.WireOut out) |
void |
process(net.openhft.chronicle.bytes.Bytes in,
net.openhft.chronicle.bytes.Bytes out,
NetworkContext nc)
The server reads the bytes
in from the client and sends a response out back
to the client. |
protected void |
publish(net.openhft.chronicle.wire.WriteMarshallable w) |
WireOutPublisher |
publisher() |
void |
publisher(WireOutPublisher publisher) |
net.openhft.chronicle.wire.WireType |
wireType()
Process an incoming request
|
void |
wireType(net.openhft.chronicle.wire.WireType wireType) |
protected void |
writeData(boolean isNotComplete,
net.openhft.chronicle.bytes.Bytes inBytes,
net.openhft.chronicle.wire.WriteMarshallable c)
write and exceptions and rolls back if no data was written
|
protected void |
writeData(net.openhft.chronicle.bytes.Bytes inBytes,
net.openhft.chronicle.wire.WriteMarshallable c)
write and exceptions and rolls back if no data was written
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonReadComplete, onReadTime, onWriteTime, sendHeartBeathasClientClosedpublic boolean isAcceptor()
public void wireType(@NotNull
net.openhft.chronicle.wire.WireType wireType)
public WireOutPublisher publisher()
public void publisher(@NotNull
WireOutPublisher publisher)
public void isAcceptor(boolean isAcceptor)
public void process(@NotNull
net.openhft.chronicle.bytes.Bytes in,
@NotNull
net.openhft.chronicle.bytes.Bytes out,
NetworkContext nc)
TcpHandlerin from the client and sends a response out back
to the client.process in interface TcpHandlerin - the bytes send from the clientout - the response send back to the clientprotected void onBytesWritten()
public void onEndOfConnection(boolean heartbeatTimeOut)
onEndOfConnection in interface TcpHandlerprotected void onWrite(@NotNull
net.openhft.chronicle.wire.WireOut out)
protected void checkWires(net.openhft.chronicle.bytes.Bytes in,
net.openhft.chronicle.bytes.Bytes out,
@NotNull
net.openhft.chronicle.wire.WireType wireType)
protected net.openhft.chronicle.wire.Wire initialiseOutWire(net.openhft.chronicle.bytes.Bytes out,
@NotNull
net.openhft.chronicle.wire.WireType wireType)
protected net.openhft.chronicle.wire.Wire initialiseInWire(@NotNull
net.openhft.chronicle.wire.WireType wireType,
net.openhft.chronicle.bytes.Bytes in)
public net.openhft.chronicle.wire.WireType wireType()
protected abstract void onRead(@NotNull
net.openhft.chronicle.wire.DocumentContext in,
@NotNull
net.openhft.chronicle.wire.WireOut out)
in - the wire to be processedout - the result of processing the inprotected void writeData(@NotNull
net.openhft.chronicle.bytes.Bytes inBytes,
@NotNull
net.openhft.chronicle.wire.WriteMarshallable c)
protected void writeData(boolean isNotComplete,
@NotNull
net.openhft.chronicle.bytes.Bytes inBytes,
@NotNull
net.openhft.chronicle.wire.WriteMarshallable c)
public final void nc(T nc)
nc in interface NetworkContextManager<T extends NetworkContext>public T nc()
nc in interface NetworkContextManager<T extends NetworkContext>protected abstract void onInitialize()
public void close()
close in interface Closeableclose in interface AutoCloseableclose in interface TcpHandlerprotected void publish(net.openhft.chronicle.wire.WriteMarshallable w)
Copyright © 2018. All rights reserved.