org.dawb.tango.extensions.factory
Class AbstractTangoConnection

java.lang.Object
  extended by org.dawb.tango.extensions.factory.AbstractTangoConnection
All Implemented Interfaces:
TangoConnection

public abstract class AbstractTangoConnection
extends java.lang.Object
implements TangoConnection


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.
 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
 void removeTangoConnectionListener(TangoConnectionListener listener)
          dispose automatically does this for all connections.
 void setCommandAttribute(java.lang.String commandAttribute)
          This is "ExecuteCmd" by default
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.dawb.tango.extensions.factory.TangoConnection
executeCommand, getValue, setValue
 

Method Detail

addTangoConnectionListener

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

Specified by:
addTangoConnectionListener in interface TangoConnection
Parameters:
listener -

removeTangoConnectionListener

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

Specified by:
removeTangoConnectionListener in interface TangoConnection
Parameters:
listener -

dispose

public void dispose()
             throws java.lang.Exception
Description copied from interface: TangoConnection
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.

Specified by:
dispose in interface TangoConnection
Throws:
java.lang.Exception

getUri

public java.lang.String getUri()
Description copied from interface: TangoConnection
Return the tango uri for this tango connection

Specified by:
getUri in interface TangoConnection
Returns:

getName

public java.lang.String getName()
Specified by:
getName in interface TangoConnection
Returns:

getAttributeName

public java.lang.String getAttributeName()
Description copied from interface: TangoConnection
May be null

Specified by:
getAttributeName in interface TangoConnection
Returns:

getCommandAttribute

public java.lang.String getCommandAttribute()
Specified by:
getCommandAttribute in interface TangoConnection
Returns:

setCommandAttribute

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

Specified by:
setCommandAttribute in interface TangoConnection
Parameters:
commandAttribute -