gov.aps.epics.jca.jni
Class JNIContext

java.lang.Object
  |
  +--gov.aps.epics.jca.Context
        |
        +--gov.aps.epics.jca.jni.JNIContext
All Implemented Interfaces:
CaConstants
Direct Known Subclasses:
JNIContextTCE, JNIContextTCI

public abstract class JNIContext
extends Context


Field Summary
protected  int _ctxtID
           
protected  gov.aps.epics.jca.ContextExceptionListener _exceptionListener
           
protected  gov.aps.epics.jca.ContextMessageListener _messageListener
           
 
Fields inherited from class gov.aps.epics.jca.Context
_contextMap
 
Fields inherited from interface gov.aps.epics.jca.CaConstants
CA_K_ERROR, CA_K_FATAL, CA_K_INFO, CA_K_SEVERE, CA_K_SUCCESS, CA_K_WARNING, CA_M_ERROR, CA_M_LEVEL, CA_M_MSG_NO, CA_M_SEVERE, CA_M_SEVERITY, CA_M_SUCCESS, CA_OP_ADD_MONITOR, CA_OP_CLEAR_MONITOR, CA_OP_CONN_DOWN, CA_OP_CONN_UP, CA_OP_FIRST, CA_OP_GET, CA_OP_LAST, CA_OP_OTHER, CA_OP_PUT, CA_OP_SEARCH, CA_OP_STRING, CA_V_MSG_NO, CA_V_SEVERITY, CA_V_SUCCESS, CALLBACK_MODE_FIRST, CALLBACK_MODE_LAST, CALLBACK_MODE_STRING, CS_CLOSED, CS_CONN, CS_FIRST, CS_LAST, CS_NEVER_CONN, CS_PREV_CONN, CS_STRING, DBE_ALARM, DBE_LOG, DBE_VALUE, DBR_BYTE, DBR_CTRL_BYTE, DBR_CTRL_DOUBLE, DBR_CTRL_ENUM, DBR_CTRL_FLOAT, DBR_CTRL_INT, DBR_CTRL_SHORT, DBR_CTRL_STRING, DBR_DOUBLE, DBR_ENUM, DBR_FIRST, DBR_FLOAT, DBR_GR_BYTE, DBR_GR_DOUBLE, DBR_GR_FLOAT, DBR_GR_INT, DBR_GR_SHORT, DBR_GR_STRING, DBR_INT, DBR_LABELS_ENUM, DBR_LAST, DBR_PUT_ACKS, DBR_PUT_ACKT, DBR_SHORT, DBR_STRING, DBR_STS_BYTE, DBR_STS_DOUBLE, DBR_STS_ENUM, DBR_STS_FLOAT, DBR_STS_INT, DBR_STS_SHORT, DBR_STS_STRING, DBR_STSACK_STRING, DBR_TIME_BYTE, DBR_TIME_DOUBLE, DBR_TIME_ENUM, DBR_TIME_FLOAT, DBR_TIME_INT, DBR_TIME_SHORT, DBR_TIME_STRING, DBR_TYPE_STRING, DISABLE_PREEMPTIVE_CALLBACK, ECA_ADDFAIL, ECA_ALLOCMEM, ECA_ANACHRONISM, ECA_BADCHID, ECA_BADCOUNT, ECA_BADFUNCPTR, ECA_BADMASK, ECA_BADMONID, ECA_BADPRIORITY, ECA_BADSTR, ECA_BADSYNCGRP, ECA_BADTYPE, ECA_BUILDGET, ECA_CHANDESTROY, ECA_CHIDNOTFND, ECA_CHIDRETRY, ECA_CONN, ECA_DBLCHNL, ECA_DBLCLFAIL, ECA_DEFUNCT, ECA_DISCONN, ECA_DISCONNCHID, ECA_DLCKREST, ECA_EMPTYSTR, ECA_EVDISALLOW, ECA_FIRST, ECA_GETFAIL, ECA_INTERNAL, ECA_IODONE, ECA_IOINPROGRESS, ECA_ISATTACHED, ECA_LAST, ECA_MAXIOC, ECA_MESSAGE_STRING, ECA_NEEDSFP, ECA_NEWADDR, ECA_NEWCONN, ECA_NOCACTX, ECA_NOCAST, ECA_NOCHANMSG, ECA_NOCONVERT, ECA_NORDACCESS, ECA_NOREPEATER, ECA_NORMAL, ECA_NOSEARCHADDR, ECA_NOSUPPORT, ECA_NOTINSERVICE, ECA_NOTTHREADED, ECA_NOWTACCESS, ECA_OVEVFAIL, ECA_PUTCBINPROG, ECA_PUTFAIL, ECA_SERVBEHIND, ECA_SOCK, ECA_STRTOBIG, ECA_TIMEOUT, ECA_TOLARGE, ECA_UKNCHAN, ECA_UKNFIELD, ECA_UKNHOST, ECA_UKNSERV, ENABLE_PREEMPTIVE_CALLBACK, THREAD_CTRL_EXTERNAL, THREAD_CTRL_FIRST, THREAD_CTRL_INTERNAL, THREAD_CTRL_LAST, THREAD_CTRL_STRING
 
Constructor Summary
JNIContext()
           
 
Method Summary
 void attachCurrentThread()
           
abstract  gov.aps.epics.jca.jni.JNIMonitor ch_addMonitor(int type, int count, gov.aps.epics.jca.jni.JNIChannel ch, gov.aps.epics.jca.MonitorListener l, int mask)
           
abstract  void ch_arrayGet(gov.aps.epics.jca.dbr.DBR dbr, gov.aps.epics.jca.jni.JNIChannel ch)
           
abstract  void ch_arrayGet(int type, int count, gov.aps.epics.jca.jni.JNIChannel ch, gov.aps.epics.jca.GetListener l)
           
abstract  void ch_arrayPut(int type, int count, gov.aps.epics.jca.jni.JNIChannel ch, java.lang.Object value)
           
abstract  void ch_arrayPut(int type, int count, gov.aps.epics.jca.jni.JNIChannel ch, java.lang.Object value, gov.aps.epics.jca.PutListener l)
           
abstract  gov.aps.epics.jca.jni.JNIChannel ch_channelCreate(java.lang.String name, gov.aps.epics.jca.ConnectionListener l)
           
abstract  void ch_channelDestroy(gov.aps.epics.jca.jni.JNIChannel ch)
           
abstract  void ch_clearMonitor(gov.aps.epics.jca.jni.JNIMonitor monitor)
           
abstract  int ch_getElementCount(gov.aps.epics.jca.jni.JNIChannel ch)
           
abstract  int ch_getFieldType(gov.aps.epics.jca.jni.JNIChannel ch)
           
abstract  java.lang.String ch_getHostName(gov.aps.epics.jca.jni.JNIChannel ch)
           
abstract  boolean ch_getReadAccess(gov.aps.epics.jca.jni.JNIChannel ch)
           
abstract  int ch_getState(gov.aps.epics.jca.jni.JNIChannel ch)
           
abstract  boolean ch_getWriteAccess(gov.aps.epics.jca.jni.JNIChannel ch)
           
abstract  void ch_setAccessRightsListener(gov.aps.epics.jca.jni.JNIChannel ch, gov.aps.epics.jca.AccessRightsListener l)
           
abstract  void ch_setConnectionListener(gov.aps.epics.jca.jni.JNIChannel ch, gov.aps.epics.jca.ConnectionListener l)
           
 gov.aps.epics.jca.Channel createChannel(java.lang.String name, gov.aps.epics.jca.ConnectionListener l)
          Create a new Channel using this context to access a process variable with a ConnectionListener to receive ConnectionEvent from the newly created Channel.
abstract  void ctxt_attachThread()
           
abstract  int ctxt_contextCreate(int mode)
           
abstract  void ctxt_contextDestroy()
           
abstract  void ctxt_flushIO()
           
abstract  int ctxt_getCallbackMode()
           
abstract  java.lang.String ctxt_getName()
           
abstract  int ctxt_getThreadCtrlMode()
           
abstract  void ctxt_pendEvent(double time)
           
abstract  void ctxt_pendIO(double timeout)
           
abstract  void ctxt_poll()
           
abstract  void ctxt_setExceptionListener(gov.aps.epics.jca.ContextExceptionListener l)
           
abstract  void ctxt_setMessageListener(gov.aps.epics.jca.ContextMessageListener l)
           
abstract  boolean ctxt_testIO()
           
 void destroy()
          Destroys the Context and clear all associated ressources.
 void flushIO()
           
 int getCallbackMode()
          Returns the Context's callback mode.
 gov.aps.epics.jca.ContextExceptionListener getContextExceptionListener()
          Returns the ContextExceptionListener registered with the Context.
 gov.aps.epics.jca.ContextMessageListener getContextMessageListener()
          Returns the ContextMessageListener registered with the Context.
protected  int getCtxtID()
           
 java.lang.String getName()
          Returns the name of the Context.
 int getThreadCtrlMode()
          Returns the Context's thread control mode.
 gov.aps.epics.jca.jni.JNIChannel lookupChannel(int channelID)
           
 void pendEvent(double time)
          Process all pending events.
 void pendIO(double timeout)
          Process all pending IO operations.
 void poll()
           
 void registerChannel(gov.aps.epics.jca.jni.JNIChannel ch)
           
 void setContextExceptionListener(gov.aps.epics.jca.ContextExceptionListener l)
          Sets the ContextExceptionListener which will receive ContextExceptionEvents from this Context.
 void setContextMessageListener(gov.aps.epics.jca.ContextMessageListener l)
          Sets the ContextMessageListener which will receive ContextMessageEvents from this Context.
protected  void setCtxtID(int ctxtID)
           
 boolean testIO()
          Tests if there are some pending IO requests.
 void unregisterChannel(gov.aps.epics.jca.jni.JNIChannel ch)
           
 
Methods inherited from class gov.aps.epics.jca.Context
createChannel, dispose, getCallbackModeString, getContextList, getThreadCtrlModeString, lookupContext, printInfo, printInfo, registerContext, unregisterContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_ctxtID

protected int _ctxtID

_messageListener

protected gov.aps.epics.jca.ContextMessageListener _messageListener

_exceptionListener

protected gov.aps.epics.jca.ContextExceptionListener _exceptionListener
Constructor Detail

JNIContext

public JNIContext()
Method Detail

setCtxtID

protected void setCtxtID(int ctxtID)

getCtxtID

protected int getCtxtID()

getName

public java.lang.String getName()
Description copied from class: Context
Returns the name of the Context.

Specified by:
getName in class Context

getThreadCtrlMode

public int getThreadCtrlMode()
Description copied from class: Context
Returns the Context's thread control mode.

Specified by:
getThreadCtrlMode in class Context
See Also:
CaConstants

getCallbackMode

public int getCallbackMode()
Description copied from class: Context
Returns the Context's callback mode.

Specified by:
getCallbackMode in class Context
See Also:
CaConstants

getContextMessageListener

public gov.aps.epics.jca.ContextMessageListener getContextMessageListener()
Description copied from class: Context
Returns the ContextMessageListener registered with the Context.

Specified by:
getContextMessageListener in class Context

setContextMessageListener

public void setContextMessageListener(gov.aps.epics.jca.ContextMessageListener l)
                               throws CaException
Description copied from class: Context
Sets the ContextMessageListener which will receive ContextMessageEvents from this Context.

Specified by:
setContextMessageListener in class Context
Parameters:
l - the ContextMessageListener.
CaException

getContextExceptionListener

public gov.aps.epics.jca.ContextExceptionListener getContextExceptionListener()
Description copied from class: Context
Returns the ContextExceptionListener registered with the Context.

Specified by:
getContextExceptionListener in class Context

setContextExceptionListener

public void setContextExceptionListener(gov.aps.epics.jca.ContextExceptionListener l)
                                 throws CaException
Description copied from class: Context
Sets the ContextExceptionListener which will receive ContextExceptionEvents from this Context.

Specified by:
setContextExceptionListener in class Context
Parameters:
l - the ContextExceptionListener.
CaException

destroy

public void destroy()
             throws CaException
Description copied from class: Context
Destroys the Context and clear all associated ressources.

Specified by:
destroy in class Context
CaException

createChannel

public gov.aps.epics.jca.Channel createChannel(java.lang.String name,
                                               gov.aps.epics.jca.ConnectionListener l)
                                        throws CaException
Description copied from class: Context
Create a new Channel using this context to access a process variable with a ConnectionListener to receive ConnectionEvent from the newly created Channel.

Specified by:
createChannel in class Context
Parameters:
name - the process variable to connect to.
l - the ConnectionListener.
Returns:
the new Channel.
Throws:
CaException - is thrown if the Context has been destroyed.

pendIO

public void pendIO(double timeout)
            throws CaException
Description copied from class: Context
Process all pending IO operations.

Specified by:
pendIO in class Context
Parameters:
timeout - the timeout limit.
Throws:
CaException - is thrown if all the IO couldn't be processed.

testIO

public boolean testIO()
               throws CaException
Description copied from class: Context
Tests if there are some pending IO requests.

Specified by:
testIO in class Context
CaException

pendEvent

public void pendEvent(double time)
               throws CaException
Description copied from class: Context
Process all pending events.

Specified by:
pendEvent in class Context
Parameters:
time - the time during which the Context will process events.
CaException

poll

public void poll()
          throws CaException
Specified by:
poll in class Context
CaException

flushIO

public void flushIO()
             throws CaException
Specified by:
flushIO in class Context
CaException

attachCurrentThread

public void attachCurrentThread()
                         throws CaException
Specified by:
attachCurrentThread in class Context
CaException

registerChannel

public void registerChannel(gov.aps.epics.jca.jni.JNIChannel ch)

lookupChannel

public gov.aps.epics.jca.jni.JNIChannel lookupChannel(int channelID)

unregisterChannel

public void unregisterChannel(gov.aps.epics.jca.jni.JNIChannel ch)

ctxt_getThreadCtrlMode

public abstract int ctxt_getThreadCtrlMode()

ctxt_getCallbackMode

public abstract int ctxt_getCallbackMode()

ctxt_getName

public abstract java.lang.String ctxt_getName()

ctxt_contextCreate

public abstract int ctxt_contextCreate(int mode)
                                throws CaException
CaException

ctxt_setMessageListener

public abstract void ctxt_setMessageListener(gov.aps.epics.jca.ContextMessageListener l)
                                      throws CaException
CaException

ctxt_setExceptionListener

public abstract void ctxt_setExceptionListener(gov.aps.epics.jca.ContextExceptionListener l)
                                        throws CaException
CaException

ctxt_contextDestroy

public abstract void ctxt_contextDestroy()
                                  throws CaException
CaException

ctxt_pendIO

public abstract void ctxt_pendIO(double timeout)
                          throws CaException
CaException

ctxt_testIO

public abstract boolean ctxt_testIO()
                             throws CaException
CaException

ctxt_pendEvent

public abstract void ctxt_pendEvent(double time)
                             throws CaException
CaException

ctxt_poll

public abstract void ctxt_poll()
                        throws CaException
CaException

ctxt_flushIO

public abstract void ctxt_flushIO()
                           throws CaException
CaException

ctxt_attachThread

public abstract void ctxt_attachThread()
                                throws CaException
CaException

ch_channelCreate

public abstract gov.aps.epics.jca.jni.JNIChannel ch_channelCreate(java.lang.String name,
                                                                  gov.aps.epics.jca.ConnectionListener l)
                                                           throws CaException
CaException

ch_channelDestroy

public abstract void ch_channelDestroy(gov.aps.epics.jca.jni.JNIChannel ch)
                                throws CaException
CaException

ch_setConnectionListener

public abstract void ch_setConnectionListener(gov.aps.epics.jca.jni.JNIChannel ch,
                                              gov.aps.epics.jca.ConnectionListener l)
                                       throws CaException
CaException

ch_setAccessRightsListener

public abstract void ch_setAccessRightsListener(gov.aps.epics.jca.jni.JNIChannel ch,
                                                gov.aps.epics.jca.AccessRightsListener l)
                                         throws CaException
CaException

ch_getFieldType

public abstract int ch_getFieldType(gov.aps.epics.jca.jni.JNIChannel ch)

ch_getElementCount

public abstract int ch_getElementCount(gov.aps.epics.jca.jni.JNIChannel ch)

ch_getState

public abstract int ch_getState(gov.aps.epics.jca.jni.JNIChannel ch)

ch_getHostName

public abstract java.lang.String ch_getHostName(gov.aps.epics.jca.jni.JNIChannel ch)

ch_getReadAccess

public abstract boolean ch_getReadAccess(gov.aps.epics.jca.jni.JNIChannel ch)

ch_getWriteAccess

public abstract boolean ch_getWriteAccess(gov.aps.epics.jca.jni.JNIChannel ch)

ch_arrayPut

public abstract void ch_arrayPut(int type,
                                 int count,
                                 gov.aps.epics.jca.jni.JNIChannel ch,
                                 java.lang.Object value)
                          throws CaException
CaException

ch_arrayPut

public abstract void ch_arrayPut(int type,
                                 int count,
                                 gov.aps.epics.jca.jni.JNIChannel ch,
                                 java.lang.Object value,
                                 gov.aps.epics.jca.PutListener l)
                          throws CaException
CaException

ch_arrayGet

public abstract void ch_arrayGet(gov.aps.epics.jca.dbr.DBR dbr,
                                 gov.aps.epics.jca.jni.JNIChannel ch)
                          throws CaException
CaException

ch_arrayGet

public abstract void ch_arrayGet(int type,
                                 int count,
                                 gov.aps.epics.jca.jni.JNIChannel ch,
                                 gov.aps.epics.jca.GetListener l)
                          throws CaException
CaException

ch_addMonitor

public abstract gov.aps.epics.jca.jni.JNIMonitor ch_addMonitor(int type,
                                                               int count,
                                                               gov.aps.epics.jca.jni.JNIChannel ch,
                                                               gov.aps.epics.jca.MonitorListener l,
                                                               int mask)
                                                        throws CaException
CaException

ch_clearMonitor

public abstract void ch_clearMonitor(gov.aps.epics.jca.jni.JNIMonitor monitor)
                              throws CaException
CaException