Class NonBlockingAbstractCodec
- java.lang.Object
-
- org.epics.pvaccess.impl.remote.codec.AbstractCodec
-
- org.epics.pvaccess.impl.remote.codec.impl.NonBlockingAbstractCodec
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Channel
,ReadableByteChannel
,WritableByteChannel
,PollEvents
,TransportSendControl
,org.epics.pvdata.pv.SerializableControl
- Direct Known Subclasses:
NonBlockingSocketAbstractCodec
public abstract class NonBlockingAbstractCodec extends AbstractCodec implements PollEvents
-
-
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 SelectionKey
key
protected Poller
poller
-
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 NonBlockingAbstractCodec(boolean serverFlag, Poller poller, ByteBuffer receiveBuffer, ByteBuffer sendBuffer, int socketSendBufferSize, Logger logger)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
close()
boolean
isOpen()
void
pollNotify(SelectionKey key)
void
readPollOne()
protected abstract void
ready()
void
registeredNotify(SelectionKey key, Throwable registrationException)
void
scheduleSend()
protected void
sendBufferFull(int tries)
void
sendCompleted()
boolean
terminated()
void
writePollOne()
-
Methods inherited from class org.epics.pvaccess.impl.remote.codec.AbstractCodec
alignBuffer, alignData, alignedValue, clearSendQueue, endMessage, enqueueSendRequest, enqueueSendRequest, ensureBuffer, ensureData, flush, flushSerializeBuffer, getLastReadBufferSocketAddress, invalidDataStreamHandler, processApplicationMessage, processControlMessage, processRead, processSendQueue, processWrite, putControlMessage, send, setByteOrder, setRecipient, setSenderThread, startMessage
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.nio.channels.ReadableByteChannel
read
-
Methods inherited from interface java.nio.channels.WritableByteChannel
write
-
-
-
-
Field Detail
-
poller
protected final Poller poller
-
key
protected volatile SelectionKey key
-
-
Constructor Detail
-
NonBlockingAbstractCodec
public NonBlockingAbstractCodec(boolean serverFlag, Poller poller, ByteBuffer receiveBuffer, ByteBuffer sendBuffer, int socketSendBufferSize, Logger logger)
-
-
Method Detail
-
ready
protected abstract void ready()
-
registeredNotify
public void registeredNotify(SelectionKey key, Throwable registrationException)
- Specified by:
registeredNotify
in interfacePollEvents
-
pollNotify
public void pollNotify(SelectionKey key) throws IOException
- Specified by:
pollNotify
in interfacePollEvents
- Throws:
IOException
-
readPollOne
public void readPollOne() throws IOException
- Specified by:
readPollOne
in classAbstractCodec
- Throws:
IOException
-
writePollOne
public void writePollOne() throws IOException
- Specified by:
writePollOne
in classAbstractCodec
- Throws:
IOException
-
sendBufferFull
protected void sendBufferFull(int tries) throws IOException
- Specified by:
sendBufferFull
in classAbstractCodec
- Throws:
IOException
-
scheduleSend
public void scheduleSend()
- Specified by:
scheduleSend
in classAbstractCodec
-
sendCompleted
public void sendCompleted()
- Specified by:
sendCompleted
in classAbstractCodec
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceChannel
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
terminated
public boolean terminated()
- Specified by:
terminated
in classAbstractCodec
-
-