Class BlockingSocketAbstractCodec
- java.lang.Object
-
- org.epics.pvaccess.impl.remote.codec.AbstractCodec
-
- org.epics.pvaccess.impl.remote.codec.impl.BlockingAbstractCodec
-
- org.epics.pvaccess.impl.remote.codec.impl.BlockingSocketAbstractCodec
-
- All Implemented Interfaces:
Closeable,AutoCloseable,Channel,ReadableByteChannel,WritableByteChannel,TransportSendControl,org.epics.pvdata.pv.SerializableControl
- Direct Known Subclasses:
BlockingTCPTransport
public abstract class BlockingSocketAbstractCodec extends BlockingAbstractCodec
- Author:
- msekoranja
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.epics.pvaccess.impl.remote.codec.AbstractCodec
AbstractCodec.ReadMode, AbstractCodec.WriteMode
-
-
Field Summary
Fields Modifier and Type Field Description protected SocketChannelchannelprotected InetSocketAddresssocketAddress-
Fields inherited from class org.epics.pvaccess.impl.remote.codec.AbstractCodec
blockingProcessQueue, command, flags, logger, MAX_ENSURE_BUFFER_SIZE, MAX_ENSURE_DATA_SIZE, MAX_ENSURE_SIZE, MAX_MESSAGE_PROCESS, MAX_MESSAGE_SEND, payloadSize, readMode, remoteTransportSocketReceiveBufferSize, sendBuffer, sendQueue, sendTo, socketBuffer, totalBytesSent, version, writeMode, writeOpReady
-
-
Constructor Summary
Constructors Constructor Description BlockingSocketAbstractCodec(boolean serverFlag, SocketChannel channel, ByteBuffer receiveBuffer, ByteBuffer sendBuffer, Logger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InetSocketAddressgetLastReadBufferSocketAddress()protected voidinternalDestroy()voidinvalidDataStreamHandler()intread(ByteBuffer dst)intwrite(ByteBuffer src)-
Methods inherited from class org.epics.pvaccess.impl.remote.codec.impl.BlockingAbstractCodec
close, isOpen, readPollOne, receiveThread, scheduleSend, sendBufferFull, sendCompleted, sendThread, start, terminated, writePollOne
-
Methods inherited from class org.epics.pvaccess.impl.remote.codec.AbstractCodec
alignBuffer, alignData, alignedValue, clearSendQueue, endMessage, enqueueSendRequest, enqueueSendRequest, ensureBuffer, ensureData, flush, flushSerializeBuffer, processApplicationMessage, processControlMessage, processRead, processSendQueue, processWrite, putControlMessage, send, setByteOrder, setRecipient, setSenderThread, startMessage
-
-
-
-
Field Detail
-
channel
protected final SocketChannel channel
-
socketAddress
protected final InetSocketAddress socketAddress
-
-
Constructor Detail
-
BlockingSocketAbstractCodec
public BlockingSocketAbstractCodec(boolean serverFlag, SocketChannel channel, ByteBuffer receiveBuffer, ByteBuffer sendBuffer, Logger logger) throws SocketException- Throws:
SocketException
-
-
Method Detail
-
read
public int read(ByteBuffer dst) throws IOException
- Throws:
IOException
-
write
public int write(ByteBuffer src) throws IOException
- Throws:
IOException
-
internalDestroy
protected void internalDestroy()
-
getLastReadBufferSocketAddress
public InetSocketAddress getLastReadBufferSocketAddress()
- Specified by:
getLastReadBufferSocketAddressin classAbstractCodec
-
invalidDataStreamHandler
public void invalidDataStreamHandler()
- Specified by:
invalidDataStreamHandlerin classAbstractCodec
-
-