com.cosylab.epics.caj.impl.requests
Class ReadNotifyRequest

java.lang.Object
  extended by com.cosylab.epics.caj.impl.requests.AbstractCARequest
      extended by com.cosylab.epics.caj.impl.requests.ReadNotifyRequest
All Implemented Interfaces:
NotifyResponseRequest, Request, ResponseRequest

public class ReadNotifyRequest
extends AbstractCARequest
implements NotifyResponseRequest

CA read notify.

Version:
$id$
Author:
Matej Sekoranja

Field Summary
protected  gov.aps.jca.event.GetListener callback
          Response callback listener.
protected  CAJChannel channel
          Channel.
protected  CAJContext context
          Context.
protected  gov.aps.jca.dbr.DBR dbr
          DBR to be set (sync.
protected  int ioid
          I/O ID given by the context when registered.
protected  boolean prohibitIOCancel
          Requested data count.
protected  int requestedDataCount
          Requested data count.
protected  int requestedDataType
          Requested data type.
protected  int sequenceNumberIO
          IO sequence number.
protected  int sid
          Channel server ID.
protected  boolean sync
          Sync.
 
Fields inherited from class com.cosylab.epics.caj.impl.requests.AbstractCARequest
requestMessage, transport
 
Fields inherited from interface com.cosylab.epics.caj.impl.Request
DEFAULT_USER_PRIORITY, MAX_USER_PRIORITY, MIN_USER_PRIORITY, SEND_IMMEDIATELY_PRIORITY
 
Constructor Summary
ReadNotifyRequest(CAJChannel channel, gov.aps.jca.event.GetListener callback, gov.aps.jca.dbr.DBR dbr, Transport transport, int sid, int dataType, int dataCount)
           
 
Method Summary
 void cancel()
          Cancel response request (allways to be called to complete/destroy).
 void exception(int errorCode, String errorMessage)
          Exception response notification.
 int getIOID()
          Get I/O ID.
 void response(int status, short dataType, int dataCount, ByteBuffer dataPayloadBuffer)
          Notification response.
 void submit()
          If sync.
 void timeout()
          Timeout notification.
 
Methods inherited from class com.cosylab.epics.caj.impl.requests.AbstractCARequest
alignBuffer, calculateAlignedSize, generateRequestMessage, getPriority, getRequestMessage, insertCAHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected CAJContext context
Context.


ioid

protected int ioid
I/O ID given by the context when registered.


sid

protected int sid
Channel server ID.


callback

protected gov.aps.jca.event.GetListener callback
Response callback listener.


dbr

protected gov.aps.jca.dbr.DBR dbr
DBR to be set (sync. request).


sync

protected boolean sync
Sync. request flag.


sequenceNumberIO

protected int sequenceNumberIO
IO sequence number.


channel

protected CAJChannel channel
Channel.


requestedDataType

protected int requestedDataType
Requested data type.


requestedDataCount

protected int requestedDataCount
Requested data count.


prohibitIOCancel

protected boolean prohibitIOCancel
Requested data count.

Constructor Detail

ReadNotifyRequest

public ReadNotifyRequest(CAJChannel channel,
                         gov.aps.jca.event.GetListener callback,
                         gov.aps.jca.dbr.DBR dbr,
                         Transport transport,
                         int sid,
                         int dataType,
                         int dataCount)
Parameters:
channel -
callback -
dbr -
transport -
sid -
dataType -
dataCount -
Method Detail

getIOID

public int getIOID()
Description copied from interface: ResponseRequest
Get I/O ID.

Specified by:
getIOID in interface ResponseRequest
Returns:
ioid
See Also:
ResponseRequest.getIOID()

response

public void response(int status,
                     short dataType,
                     int dataCount,
                     ByteBuffer dataPayloadBuffer)
Description copied from interface: NotifyResponseRequest
Notification response.

Specified by:
response in interface NotifyResponseRequest
See Also:
NotifyResponseRequest.response(int, short, int, java.nio.ByteBuffer)

submit

public void submit()
            throws IOException
If sync. request (i.e. w/o callback), additionally increment context pending requests.

Specified by:
submit in interface Request
Overrides:
submit in class AbstractCARequest
Throws:
IOException
See Also:
Request.submit()

cancel

public void cancel()
Description copied from interface: ResponseRequest
Cancel response request (allways to be called to complete/destroy).

Specified by:
cancel in interface ResponseRequest
See Also:
ResponseRequest.cancel()

timeout

public void timeout()
Description copied from interface: ResponseRequest
Timeout notification.

Specified by:
timeout in interface ResponseRequest
See Also:
ResponseRequest.timeout()

exception

public void exception(int errorCode,
                      String errorMessage)
Description copied from interface: ResponseRequest
Exception response notification.

Specified by:
exception in interface ResponseRequest
Parameters:
errorCode - exception code.
errorMessage - received detailed message.
See Also:
ResponseRequest.exception(int, java.lang.String)


Copyright © 2004-2013 Cosylab. All Rights Reserved.