|
TANGO Java API ( TangORB-7.3.3.jar) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfr.esrf.TangoApi.ApiUtil
public class ApiUtil
Class Description: This class manage a static vector of Database object.
Usage example:
| Constructor Summary | |
|---|---|
ApiUtil()
|
|
| Method Summary | |
|---|---|
static Database |
change_db_obj(java.lang.String host,
java.lang.String port)
Return the database object created for specified host and port, and set this database object for all following uses.. |
static void |
create_event_consumer()
Create the event consumer. |
static fr.esrf.TangoApi.AsyncCallObject |
get_async_object(int id)
Return the Asynch Object in hash table for the id |
static org.omg.CORBA.Request |
get_async_request(int id)
Return the request in hash table for the id |
static int |
get_asynch_cb_sub_model()
Set the callback sub model used (ApiDefs.PUSH_CALLBACK or ApiDefs.PULL_CALLBACK). |
static void |
get_asynch_replies()
Fire callback methods for all (any device) asynchronous requests(cmd and attr) with already arrived replies. |
static void |
get_asynch_replies(DeviceProxy dev)
Fire callback methods for all (any device) asynchronous requests(cmd and attr) with already arrived replies. |
static void |
get_asynch_replies(DeviceProxy dev,
int timeout)
Fire callback methods for all (any device) asynchronous requests(cmd and attr) with already arrived replies. |
static void |
get_asynch_replies(int timeout)
Fire callback methods for all (any device) asynchronous requests(cmd and attr) with already arrived replies. |
static Database |
get_db_obj()
Return the database object created with TANGO_HOST environment variable . |
static Database |
get_db_obj(java.lang.String tango_host)
Return the database object created for specified host and port. |
static Database |
get_db_obj(java.lang.String host,
java.lang.String port)
Return the database object created for specified host and port. |
static Database |
get_default_db_obj()
Return the database object created with TANGO_HOST environment variable . |
static IEventConsumer |
get_event_consumer()
Get the event consumer singleton object. |
static org.omg.CORBA.ORB |
get_orb()
Return the orb object |
static java.lang.String |
getAccessDevname()
Returns the ACCESS_DEVNAME found in JVM, environment, tangorc file,.... |
IApiUtilDAO |
getApiUtilDAO()
|
static org.omg.CORBA.ORB |
getOrb()
|
static java.lang.String |
getORBgiopMaxMsgSize()
Returns the ORBgiopMaxMsgSize found in JVM, environment, tangorc file,.... |
static int |
getReconnectionDelay()
|
static java.lang.String |
getStrDefaultTimeout()
Returns the TANGO_TIMEOUT found in JVM, environment, tangorc file,.... |
static java.lang.String |
getTangoHost()
Returns the TANGO_HOST found in JVM, environment, tangorc file,.... |
static boolean |
in_server()
Return true if in server code or false if in client code. |
static boolean |
isSuperTango()
Returns the SUPER_TANGO found in JVM, environment, tangorc file,.... |
static java.lang.String[] |
parseTangoHost(java.lang.String tgh)
Parse Tango host (check multi Tango_host) |
static int |
pending_asynch_call(DeviceProxy dev,
int reply_model)
return the still pending asynchronous call for a reply model. |
static int |
pending_asynch_call(int reply_model)
return the still pending asynchronous call for a reply model. |
static int |
put_async_request(fr.esrf.TangoApi.AsyncCallObject aco)
Add request in hash table and return id |
static java.lang.String |
qualityName(AttrQuality att_q)
|
static java.lang.String |
qualityName(short att_q_val)
|
static void |
remove_async_request(int id)
Remove asynchronous call request and id from hashtable. |
static void |
set_async_reply_cb(int id,
CallBack cb)
Set the Callback object in AsyncCallObject for the id key. |
static void |
set_async_reply_model(int id,
int reply_model)
Set the reply_model in AsyncCallObject for the id key. |
static void |
set_asynch_cb_sub_model(int model)
Return the callback sub model used. |
static Database |
set_db_obj(java.lang.String tango_host)
Return the database object created for specified host and port. |
static Database |
set_db_obj(java.lang.String host,
java.lang.String port)
Return the database object created for specified host and port, and set this database object for all following uses.. |
static void |
set_in_server(boolean val)
Return the orb object |
void |
setApiUtilDAO(IApiUtilDAO databaseDAO)
|
static void |
setOrb(org.omg.CORBA.ORB orb)
|
static java.lang.String |
stateName(DevState state)
|
static java.lang.String |
stateName(short state_val)
|
static DbAttribute[] |
toDbAttributeArray(java.lang.String[] array,
int mode)
Convert a StringArray to a DbAttribute class array |
static java.lang.String[] |
toStringArray(java.lang.String argin)
Convert arguments to one String array |
static java.lang.String[] |
toStringArray(java.lang.String objname,
DbAttribute[] attr,
int mode)
Convert a DbAttribute class array to a StringArray. |
static java.lang.String[] |
toStringArray(java.lang.String objname,
java.lang.String argin)
Convert arguments to one String array |
static java.lang.String[] |
toStringArray(java.lang.String objname,
java.lang.String[] argin)
Convert arguments to one String array |
static boolean |
useDefaultFactory()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ApiUtil()
| Method Detail |
|---|
public IApiUtilDAO getApiUtilDAO()
public void setApiUtilDAO(IApiUtilDAO databaseDAO)
public static boolean useDefaultFactory()
public static Database get_db_obj(java.lang.String tango_host)
throws DevFailed
tango_host - host and port (hostname:portnumber) where database is running.
DevFailed
public static Database get_default_db_obj()
throws DevFailed
DevFailed
public static Database get_db_obj()
throws DevFailed
DevFailed
public static Database get_db_obj(java.lang.String host,
java.lang.String port)
throws DevFailed
host - host where database is running.port - port for database connection.
DevFailed
public static Database change_db_obj(java.lang.String host,
java.lang.String port)
throws DevFailed
host - host where database is running.port - port for database connection.
DevFailed
public static Database set_db_obj(java.lang.String host,
java.lang.String port)
throws DevFailed
host - host where database is running.port - port for database connection.
DevFailed
public static Database set_db_obj(java.lang.String tango_host)
throws DevFailed
tango_host - host and port (hostname:portnumber) where database is running.
DevFailed
public static org.omg.CORBA.ORB get_orb()
throws DevFailed
DevFailedpublic static void set_in_server(boolean val)
public static boolean in_server()
public static int getReconnectionDelay()
public static int put_async_request(fr.esrf.TangoApi.AsyncCallObject aco)
public static org.omg.CORBA.Request get_async_request(int id)
throws DevFailed
DevFailedpublic static fr.esrf.TangoApi.AsyncCallObject get_async_object(int id)
public static void remove_async_request(int id)
public static void set_async_reply_model(int id,
int reply_model)
public static void set_async_reply_cb(int id,
CallBack cb)
public static int pending_asynch_call(DeviceProxy dev,
int reply_model)
dev - DeviceProxy object.reply_model - ApiDefs.ALL_ASYNCH, POLLING or CALLBACK.public static int pending_asynch_call(int reply_model)
reply_model - ApiDefs.ALL_ASYNCH, POLLING or CALLBACK.public static void set_asynch_cb_sub_model(int model)
model - ApiDefs.PUSH_CALLBACK or ApiDefs.PULL_CALLBACK.public static int get_asynch_cb_sub_model()
public static void get_asynch_replies()
public static void get_asynch_replies(int timeout)
public static void get_asynch_replies(DeviceProxy dev)
public static void get_asynch_replies(DeviceProxy dev,
int timeout)
public static java.lang.String[] toStringArray(java.lang.String objname,
java.lang.String[] argin)
public static java.lang.String[] toStringArray(java.lang.String objname,
java.lang.String argin)
public static java.lang.String[] toStringArray(java.lang.String argin)
public static java.lang.String[] toStringArray(java.lang.String objname,
DbAttribute[] attr,
int mode)
objname - object name (used in first index of output array)..attr - DbAttribute array to be converted
public static DbAttribute[] toDbAttributeArray(java.lang.String[] array,
int mode)
throws DevFailed
array - String array to be convertedmode - decode argout params mode (mode=2 added 26/10/04)
DevFailedpublic static java.lang.String stateName(DevState state)
public static java.lang.String stateName(short state_val)
public static java.lang.String qualityName(AttrQuality att_q)
public static java.lang.String qualityName(short att_q_val)
public static java.lang.String[] parseTangoHost(java.lang.String tgh)
throws DevFailed
DevFailed
public static void create_event_consumer()
throws DevFailed
DevFailedpublic static IEventConsumer get_event_consumer()
public static org.omg.CORBA.ORB getOrb()
public static void setOrb(org.omg.CORBA.ORB orb)
public static java.lang.String getTangoHost()
throws DevFailed
DevFailedpublic static boolean isSuperTango()
public static java.lang.String getAccessDevname()
public static java.lang.String getStrDefaultTimeout()
public static java.lang.String getORBgiopMaxMsgSize()
|
TANGO Java API ( TangORB-7.3.3.jar) |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||