|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.cosylab.epics.caj.impl.CATransport
public class CATransport
CA transport implementation.
| Field Summary | |
|---|---|
protected short |
priority
Process priority. |
protected ResponseHandler |
responseHandler
CA reponse handler. |
| Constructor Summary | |
|---|---|
CATransport(CAJContext context,
TransportClient client,
ResponseHandler responseHandler,
SocketChannel channel,
short remoteTransportRevision,
short priority)
|
|
| Method Summary | |
|---|---|
boolean |
acquire(TransportClient client)
Acquires transport. |
void |
beaconArrivalNotify()
Beacon arrival. |
void |
changedTransport()
Changed transport (server restared) notify. |
void |
close(boolean forced)
Close connection. |
protected void |
disableFlowControl()
Disable flow control (enables events). |
void |
echoNotify()
Called when echo request (state-of-health message) was responed. |
protected void |
enableFlowControl()
Enable flow control (disables events). |
boolean |
flush()
Flush send buffer. |
boolean |
flushInternal()
Flush send buffer (blocks until flushed). |
CAContext |
getContext()
Get context transport is living in. |
short |
getMinorRevision()
Transport protocol minor revision. |
short |
getPriority()
Transport priority. |
InetSocketAddress |
getRemoteAddress()
Get remote address. |
void |
handleEvent(SelectionKey key)
Handle IO event. |
protected void |
processRead()
Process input (read) IO event. |
protected void |
processRead(ByteBuffer socketBuffer)
Process input. |
protected void |
processWrite()
Process output (write) IO event. |
void |
release(TransportClient client)
Releases transport. |
void |
send(ByteBuffer buffer)
Send a buffer through the transport. |
void |
submit(Request requestMessage)
Enqueue (if supported or if necessary send immediately) request message. |
void |
timeout(long timeToRun)
Beacon timer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ResponseHandler responseHandler
protected short priority
| Constructor Detail |
|---|
public CATransport(CAJContext context,
TransportClient client,
ResponseHandler responseHandler,
SocketChannel channel,
short remoteTransportRevision,
short priority)
context - responseHandler - client - channel - remoteTransportRevision - priority - | Method Detail |
|---|
public void close(boolean forced)
forced - flag indicating if forced (e.g. forced disconnect) is requiredpublic boolean acquire(TransportClient client)
client - client (channel) acquiring the transport
true if transport was granted, false otherwise.public void release(TransportClient client)
client - client (channel) releasing the transportpublic short getMinorRevision()
Transport
getMinorRevision in interface TransportTransport.getMinorRevision()public void handleEvent(SelectionKey key)
handleEvent in interface ReactorHandlerkey - key to be processed.ReactorHandler.handleEvent(java.nio.channels.SelectionKey)protected void processRead()
protected void processRead(ByteBuffer socketBuffer)
protected void processWrite()
protected void disableFlowControl()
protected void enableFlowControl()
public void send(ByteBuffer buffer)
throws IOException
buffer - buffer to be sent
IOExceptionpublic boolean flush()
flush in interface Transporttrue on success, false on failure.Transport.flush()public boolean flushInternal()
Transport.flush()
public void submit(Request requestMessage)
throws IOException
TransportSEND_IMMEDIATELY_PRIORITY.
submit in interface TransportrequestMessage - request message to enqueue.
IOExceptionTransport.submit(com.cosylab.epics.caj.impl.Request)public CAContext getContext()
Transport
getContext in interface TransportTransport.getContext()public InetSocketAddress getRemoteAddress()
Transport
getRemoteAddress in interface TransportTransport.getRemoteAddress()public short getPriority()
Transport
getPriority in interface TransportTransport.getPriority()public void beaconArrivalNotify()
public void timeout(long timeToRun)
timeout in interface Timer.TimerRunnabletimeToRun - time in ms to run.Timer.TimerRunnable.timeout(long)public void echoNotify()
public void changedTransport()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||