Package com.ocient.transport
Class JavaNetOcientWireV1Transport
java.lang.Object
com.ocient.transport.JavaNetOcientWireV1Transport
- All Implemented Interfaces:
com.ibm.asyncutil.util.AsyncCloseable,SimplexTransport<io.netty.buffer.ByteBuf,io.netty.buffer.ByteBuf>
public class JavaNetOcientWireV1Transport
extends Object
implements SimplexTransport<io.netty.buffer.ByteBuf,io.netty.buffer.ByteBuf>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.ocient.transport.SimplexTransport
SimplexTransport.Ctx, SimplexTransport.StreamCtx<T> -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionio.netty.buffer.ByteBufallocate(int capacity) Allocates an I/O capableByteBufwith the specified capacity.close()getSock()booleanisValid()CompletionStage<TransportResult<io.netty.buffer.ByteBuf>> sendAndReceive(io.netty.buffer.ByteBuf request, SimplexTransport.Ctx ctx) Sends aSimplexTransportto the server and returns aCompletionStagethat completes with theSimplexTransportfrom the server.sendNoReceive(io.netty.buffer.ByteBuf request, SimplexTransport.Ctx ctx) SendsSimplexTransportto the server.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.ocient.transport.SimplexTransport
stream
-
Constructor Details
-
JavaNetOcientWireV1Transport
-
-
Method Details
-
getSock
-
getLocalAddress
- Specified by:
getLocalAddressin interfaceSimplexTransport<io.netty.buffer.ByteBuf,io.netty.buffer.ByteBuf>
-
getRemoteAddress
- Specified by:
getRemoteAddressin interfaceSimplexTransport<io.netty.buffer.ByteBuf,io.netty.buffer.ByteBuf>
-
getInputStream
-
getOutputStream
-
sendAndReceive
public CompletionStage<TransportResult<io.netty.buffer.ByteBuf>> sendAndReceive(io.netty.buffer.ByteBuf request, SimplexTransport.Ctx ctx) Description copied from interface:SimplexTransportSends aSimplexTransportto the server and returns aCompletionStagethat completes with theSimplexTransportfrom the server.- Specified by:
sendAndReceivein interfaceSimplexTransport<io.netty.buffer.ByteBuf,io.netty.buffer.ByteBuf> - Parameters:
request- theSimplexTransport- Returns:
- a
CompletionStagethat completes with aSimplexTransportfrom the server.
-
sendNoReceive
public CompletionStage<TransportResult<Void>> sendNoReceive(io.netty.buffer.ByteBuf request, SimplexTransport.Ctx ctx) Description copied from interface:SimplexTransportSendsSimplexTransportto the server. notably, a response is NOT expected from the server.- Specified by:
sendNoReceivein interfaceSimplexTransport<io.netty.buffer.ByteBuf,io.netty.buffer.ByteBuf> - Parameters:
request- theSimplexTransport
-
allocate
public io.netty.buffer.ByteBuf allocate(int capacity) Description copied from interface:SimplexTransportAllocates an I/O capableByteBufwith the specified capacity.- Specified by:
allocatein interfaceSimplexTransport<io.netty.buffer.ByteBuf,io.netty.buffer.ByteBuf> - Parameters:
capacity- the desired capacity of the new buffer.- Returns:
- a new I/O capable
ByteBufwith the specified capacity.
-
close
- Specified by:
closein interfacecom.ibm.asyncutil.util.AsyncCloseable- Specified by:
closein interfaceSimplexTransport<io.netty.buffer.ByteBuf,io.netty.buffer.ByteBuf>
-
isValid
public boolean isValid()- Specified by:
isValidin interfaceSimplexTransport<io.netty.buffer.ByteBuf,io.netty.buffer.ByteBuf>
-
toString
-