org.dawb.tango.extensions.factory
Interface TangoConnection

All Known Implementing Classes:
AbstractTangoConnection

public interface TangoConnection

Wraps a connection which may be a dummy!

Author:
gerring

Method Summary
 void addTangoConnectionListener(TangoConnectionListener listener)
          If dispose has been called, throws an exception
 void dispose()
          Because tango sometimes caches connections - dispose is *NOT* garanteed to kill this connection.
 void executeCommand(java.lang.String cmd, boolean async)
          Send a command to a spec session.
 java.lang.String getAttributeName()
          May be null
 java.lang.String getCommandAttribute()
           
 java.lang.String getName()
           
 java.lang.String getUri()
          Return the tango uri for this tango connection
 fr.esrf.TangoApi.DeviceAttribute getValue()
          Returns a Tango attribute for the value
 void removeTangoConnectionListener(TangoConnectionListener listener)
          dispose automatically does this for all connections.
 void setCommandAttribute(java.lang.String commandAttribute)
          This is usually "ExecuteCmd" by default
 void setValue(fr.esrf.TangoApi.DeviceAttribute value)
          Returns a Tango attribute for the value
 

Method Detail

dispose

void dispose()
             throws java.lang.Exception
Because tango sometimes caches connections - dispose is *NOT* garanteed to kill this connection. If there are more than one connections to the motor. Therefore you must always call removeTangoConnectionListener(...) which will and then dispose() which will dispose if you are the last user. This is a restriction of tango.

Throws:
java.lang.Exception

getValue

fr.esrf.TangoApi.DeviceAttribute getValue()
                                          throws java.lang.Exception
Returns a Tango attribute for the value

Returns:
Throws:
java.lang.Exception

setValue

void setValue(fr.esrf.TangoApi.DeviceAttribute value)
              throws java.lang.Exception
Returns a Tango attribute for the value

Throws:
java.lang.Exception

addTangoConnectionListener

void addTangoConnectionListener(TangoConnectionListener listener)
If dispose has been called, throws an exception

Parameters:
listener -

removeTangoConnectionListener

void removeTangoConnectionListener(TangoConnectionListener listener)
dispose automatically does this for all connections.

Parameters:
listener -

executeCommand

void executeCommand(java.lang.String cmd,
                    boolean async)
                    throws java.lang.Exception
Send a command to a spec session. Uses the channel 'ExecuteCmd'

Parameters:
cmd -
Throws:
java.lang.Exception

getUri

java.lang.String getUri()
Return the tango uri for this tango connection

Returns:

getName

java.lang.String getName()
Returns:

getAttributeName

java.lang.String getAttributeName()
May be null

Returns:

getCommandAttribute

java.lang.String getCommandAttribute()
Returns:

setCommandAttribute

void setCommandAttribute(java.lang.String commandAttribute)
This is usually "ExecuteCmd" by default

Parameters:
commandAttribute -