TANGO Java API
( TangORB-7.3.3.jar)

fr.esrf.TangoApi
Interface IConnectionDAO

All Known Subinterfaces:
IDatabaseDAO, IDeviceProxyDAO
All Known Implementing Classes:
ConnectionDAODefaultImpl, DatabaseDAODefaultImpl, DeviceProxyDAODefaultImpl

public interface IConnectionDAO


Method Summary
 java.lang.String adm_name(Connection connection)
          return the administartion device name.
 java.lang.String[] black_box(Connection connection, int length)
          Execute a info command to a device server.
 void build_connection(Connection connection)
           
 void checkIfTaco(Connection connection, java.lang.String cmdname)
          if not a TACO command then throw a DevFailed Exception.
 void checkIfTango(Connection connection, java.lang.String cmdname)
          if not a TACO command then throw a DevFailed Exception.
 DeviceData command_inout(Connection connection, java.lang.String command)
          Send a command to a device server.
 DeviceData command_inout(Connection connection, java.lang.String command, DeviceData argin)
          Send a command to a device server.
 CommandInfo[] command_list_query(Connection connection)
          Execute a command_list_query command to a device server.
 java.lang.String description(Connection connection)
          return the device connected dexcription.
 void dev_import(Connection connection)
          Really build the device connection.
 java.lang.String get_class_name(Connection connection)
          return the device connected class name.
 Device get_device(Connection connection)
           
 java.lang.String get_host_name(Connection connection)
          return the device connected host name.
 int get_idl_version(Connection connection)
          Returns the IDL version supported
 java.lang.String get_ior(Connection connection)
           
 java.lang.String get_name(Connection connection)
          return the device connected name.
 java.lang.String get_server_name(Connection connection)
          return the device connected server name.
 DevSource get_source(Connection connection)
          returns the device data source
 java.lang.String get_tango_host(Connection connection)
          return the name of connection (host:port)
 int get_timeout_millis(Connection connection)
          return the timeout value for a device call.
 int get_timeout(Connection connection)
          Deprecated. use get_timeout_millis() instead
 boolean get_transparency_reconnection(Connection connection)
          return the value of transparent_reconnection
 int getAccessControl(Connection connection)
           
 DevInfo_3 info_3(Connection connection)
          Execute a info command to a device server.
 DevInfo info(Connection connection)
          Execute a info command to a device server.
 void init(Connection connection)
          Connection constructor.
 void init(Connection connection, DbDevImportInfo info)
          Connection constructor.
 void init(Connection connection, java.lang.String devname)
          Connection constructor.
 void init(Connection connection, java.lang.String devname, boolean check_access)
          Connection constructor.
 void init(Connection connection, java.lang.String host, java.lang.String port)
          Connection constructor.
 void init(Connection connection, java.lang.String host, java.lang.String port, boolean auto_reconnect)
          Connection constructor.
 void init(Connection connection, java.lang.String devname, java.lang.String param, int src)
          Connection constructor.
 void init(Connection connection, java.lang.String devname, java.lang.String host, java.lang.String port)
          Connection constructor.
 boolean is_taco(Connection connection)
          return true if device is a taco device
 boolean isAllowedCommand(Connection connection, java.lang.String cmd)
           
 long ping(Connection connection)
          Execute a ping command to a device server.
 void set_source(Connection connection, DevSource new_src)
          Set the device data source
 void set_timeout_millis(Connection connection, int millis)
          Change the timeout value for a device call.
 void set_transparency_reconnection(Connection connection, boolean val)
          set the value of transparent_reconnection
 void setAccessControl(Connection connection, int access)
           
 void throw_dev_failed(Connection connection, java.lang.Exception e, java.lang.String command, boolean from_inout_cmd)
          Build reason and origin of the exception And throw it into a DevFailed exception
 

Method Detail

init

void init(Connection connection)
          throws DevFailed
Connection constructor. It makes a connection on database server.

Throws:
DevFailed

init

void init(Connection connection,
          java.lang.String host,
          java.lang.String port)
          throws DevFailed
Connection constructor. It makes a connection on database server.

Parameters:
host - host where database is running.
port - port for database connection.
Throws:
DevFailed

init

void init(Connection connection,
          java.lang.String host,
          java.lang.String port,
          boolean auto_reconnect)
          throws DevFailed
Connection constructor. It makes a connection on database server.

Parameters:
host - host where database is running.
port - port for database connection.
auto_reconnect - do not reconnect if false.
Throws:
DevFailed

init

void init(Connection connection,
          java.lang.String devname)
          throws DevFailed
Connection constructor. It imports the device.

Parameters:
devname - name of the device to be imported.
Throws:
DevFailed

init

void init(Connection connection,
          DbDevImportInfo info)
          throws DevFailed
Connection constructor. It imports the device.

Parameters:
info - exported info of the device to be imported.
Throws:
DevFailed

init

void init(Connection connection,
          java.lang.String devname,
          boolean check_access)
          throws DevFailed
Connection constructor. It imports the device. And set check_access.

Parameters:
devname - name of the device to be imported.
check_access - set check_access value
Throws:
DevFailed

init

void init(Connection connection,
          java.lang.String devname,
          java.lang.String param,
          int src)
          throws DevFailed
Connection constructor. It imports the device.

Parameters:
devname - name of the device to be imported.
param - String parameter to import device.
src - Source to import device (ior, dbase...)
Throws:
DevFailed

init

void init(Connection connection,
          java.lang.String devname,
          java.lang.String host,
          java.lang.String port)
          throws DevFailed
Connection constructor. It imports the device.

Parameters:
devname - name of the device to be imported.
host - host where database is running.
port - port for database connection.
Throws:
DevFailed

get_device

Device get_device(Connection connection)

build_connection

void build_connection(Connection connection)
                      throws DevFailed
Throws:
DevFailed

get_ior

java.lang.String get_ior(Connection connection)
                         throws DevFailed
Throws:
DevFailed

dev_import

void dev_import(Connection connection)
                throws DevFailed
Really build the device connection.

Throws:
DevFailed

set_timeout_millis

void set_timeout_millis(Connection connection,
                        int millis)
                        throws DevFailed
Change the timeout value for a device call.

Parameters:
millis - New value of the timeout in milliseconds.
Throws:
DevFailed - if orb.create_policy throws an org.omg.CORBA.PolicyError exception.

get_timeout

int get_timeout(Connection connection)
Deprecated. use get_timeout_millis() instead

return the timeout value for a device call.

Returns:
the value of the timeout in milliseconds.

get_timeout_millis

int get_timeout_millis(Connection connection)
                       throws DevFailed
return the timeout value for a device call.

Returns:
the value of the timeout in milliseconds.
Throws:
DevFailed

command_inout

DeviceData command_inout(Connection connection,
                         java.lang.String command,
                         DeviceData argin)
                         throws DevFailed
Send a command to a device server.

Parameters:
command - Command name to send to the device.
argin - input command argument.
Returns:
the output argument of the command.
Throws:
DevFailed

command_inout

DeviceData command_inout(Connection connection,
                         java.lang.String command)
                         throws DevFailed
Send a command to a device server.

Parameters:
command - Command name.
Returns:
the output argument of the command.
Throws:
DevFailed

ping

long ping(Connection connection)
          throws DevFailed
Execute a ping command to a device server.

Returns:
the elapsed time for ping command in microseconds.
Throws:
DevFailed

black_box

java.lang.String[] black_box(Connection connection,
                             int length)
                             throws DevFailed
Execute a info command to a device server.

Throws:
DevFailed

info_3

DevInfo_3 info_3(Connection connection)
                 throws DevFailed
Execute a info command to a device server.

Throws:
DevFailed

info

DevInfo info(Connection connection)
             throws DevFailed
Execute a info command to a device server.

Throws:
DevFailed

command_list_query

CommandInfo[] command_list_query(Connection connection)
                                 throws DevFailed
Execute a command_list_query command to a device server.

Throws:
DevFailed

get_idl_version

int get_idl_version(Connection connection)
                    throws DevFailed
Returns the IDL version supported

Returns:
the IDL version supported .
Throws:
DevFailed

get_source

DevSource get_source(Connection connection)
                     throws DevFailed
returns the device data source

Returns:
data source (CACHE_DEV, CACHE or DEV).
Throws:
DevFailed

set_source

void set_source(Connection connection,
                DevSource new_src)
                throws DevFailed
Set the device data source

Parameters:
new_src - new data source (CACHE_DEV, CACHE or DEV).
Throws:
DevFailed

get_name

java.lang.String get_name(Connection connection)
return the device connected name.


get_host_name

java.lang.String get_host_name(Connection connection)
                               throws DevFailed
return the device connected host name.

Throws:
DevFailed

get_class_name

java.lang.String get_class_name(Connection connection)
                                throws DevFailed
return the device connected class name.

Throws:
DevFailed

get_server_name

java.lang.String get_server_name(Connection connection)
                                 throws DevFailed
return the device connected server name.

Throws:
DevFailed

description

java.lang.String description(Connection connection)
                             throws DevFailed
return the device connected dexcription.

Throws:
DevFailed

adm_name

java.lang.String adm_name(Connection connection)
                          throws DevFailed
return the administartion device name.

Throws:
DevFailed

get_tango_host

java.lang.String get_tango_host(Connection connection)
                                throws DevFailed
return the name of connection (host:port)

Throws:
DevFailed

is_taco

boolean is_taco(Connection connection)
return true if device is a taco device


checkIfTaco

void checkIfTaco(Connection connection,
                 java.lang.String cmdname)
                 throws DevFailed
if not a TACO command then throw a DevFailed Exception.

Parameters:
cmdname - command name to be put inside reason and origin fields.
Throws:
DevFailed

checkIfTango

void checkIfTango(Connection connection,
                  java.lang.String cmdname)
                  throws DevFailed
if not a TACO command then throw a DevFailed Exception.

Parameters:
cmdname - command name to be put inside reason and origin fields.
Throws:
DevFailed

get_transparency_reconnection

boolean get_transparency_reconnection(Connection connection)
return the value of transparent_reconnection


set_transparency_reconnection

void set_transparency_reconnection(Connection connection,
                                   boolean val)
set the value of transparent_reconnection


getAccessControl

int getAccessControl(Connection connection)

setAccessControl

void setAccessControl(Connection connection,
                      int access)

isAllowedCommand

boolean isAllowedCommand(Connection connection,
                         java.lang.String cmd)
                         throws DevFailed
Throws:
DevFailed

throw_dev_failed

void throw_dev_failed(Connection connection,
                      java.lang.Exception e,
                      java.lang.String command,
                      boolean from_inout_cmd)
                      throws DevFailed
Build reason and origin of the exception And throw it into a DevFailed exception

Throws:
DevFailed

TANGO Java API
( TangORB-7.3.3.jar)