DESY ACOP Beans Home

de.desy.acop.displayers.selector
Class Selector

java.lang.Object
  extended by de.desy.acop.displayers.selector.Selector

public class Selector
extends java.lang.Object

Selector is a non-visual bean which performs all queries for remote property names. The queries are bean started by selecting the higher level parameter. First the access protocol should be selected, which triggers the context query. Upon selecting the context, subsystem query will be performed etc.

All queries made in this bean are synchronous. However one cannot explicitely demand a list of parameters if the query has not been completed. After each of the queries completes it will set the parameters to the property whic will fire a PropertyChangeEvent notifying the listeners that one of the properties has changed. In addition to that selector also fires QueryEvents each time a query was started or finished.

Version:
$Id: Templates.xml,v 1.10 2004/01/13 16:17:13 jbobnar Exp $
Author:
Jaka Bobnar
See Also:
TQuery

Field Summary
static java.lang.String PROTOCOL_TINE
           
 
Constructor Summary
Selector()
          Constructs a new Selector.
 
Method Summary
 void addExceptionListener(ExceptionListener l)
          Adds an ExceptionListener which receives notifications of all exceptions that occured while queries were performed.
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Adds a PropertyChangeListener for all properties.
 void addPropertyChangeListener(java.lang.String name, java.beans.PropertyChangeListener l)
          Adds a PropertyChangeListener and assigns it to listen to a specific property.
 void addQueryListener(QueryListener l)
          Adds a QueryListener which receives notifications when query is started or finished.
protected  void firePropertyChange(java.lang.String name, java.lang.Object oldValue, java.lang.Object newValue)
           
protected  void fireQueryFinished(java.lang.String process)
           
protected  void fireQueryStarted(java.lang.String process)
           
 AccessMode getAccessMode()
          Returns selected access mode.
 int getAccessRate()
          Returns the access rate.
 java.lang.String[] getAvailableContexts()
          Returns all available contexts loaded from remote server.
 java.lang.String[] getAvailableDevices()
          Returns all available devices loaded from remote server.
 java.lang.String[] getAvailableProperties()
          Returns all available properties loaded from remote server.
 java.lang.String[] getAvailableProtcols()
          Returns all available protocols.
 java.lang.String[] getAvailableServers()
          Returns all available servers loaded from remote server.
 java.lang.String[] getAvailableSubsystems()
          Returns all available subsystems loaded from the remote server.
 java.lang.String getRemoteName()
          Returns the remote name constructed from the selected parameters.
 java.lang.String getSelectedContext()
          Returns the selected context.
 java.lang.String getSelectedDevice()
          Returns the selected device.
 java.lang.String getSelectedProperty()
          Returns the selected property.
 java.lang.String getSelectedProtocol()
          Returns the selected protocol.
 java.lang.String getSelectedServer()
          Returns the selected server.
 java.lang.String getSelectedSubSystem()
          Returns the selected subsystem.
 boolean isBusy()
           
 boolean isShowStockProperties()
          Returns a flag if stock properties should also be loaded at the same time when properties are loaded.
static void main(java.lang.String[] args)
           
 void removeExceptionListener(ExceptionListener l)
          Removes an ExceptionListener.
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
          Removes a PropertyChangeListener.
 void removePropertyChangeListener(java.lang.String name, java.beans.PropertyChangeListener l)
          Removes a PropertyChangeListener from listening a specific property.
 void removeQueryListener(QueryListener l)
          Removes a QueryListener.
 void setAccessMode(AccessMode mode)
          Sets the access mode.
 void setAccessRate(int value)
          Sets the access rate.
 void setSelectedContext(java.lang.String selectedContext)
          Selects a context and initiates subsystem query.
 void setSelectedDevice(java.lang.String selectedDevice)
          Selects a device and intiates property names query.
 void setSelectedProperty(java.lang.String selectedProperty)
          Selects the property and reinitiates the device name query for potential reversed hierarchy.
 void setSelectedProtocol(java.lang.String selectedProtocol)
          Selects a device protocol and initiates qontext search.
 void setSelectedServer(java.lang.String selectedServer)
          Selects the device server and initiates device and property name queryies.
 void setSelectedSubSystem(java.lang.String selectedSubSystem)
          Selects the subsystem and initiates server query.
 void setShowStockProperties(boolean showStockProperties)
          Sets the stock properties flag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROTOCOL_TINE

public static final java.lang.String PROTOCOL_TINE
See Also:
Constant Field Values
Constructor Detail

Selector

public Selector()
Constructs a new Selector.

Method Detail

main

public static void main(java.lang.String[] args)

isBusy

public boolean isBusy()

getSelectedContext

public java.lang.String getSelectedContext()
Returns the selected context.

Returns:
the selectedContext

setSelectedContext

public void setSelectedContext(java.lang.String selectedContext)
Selects a context and initiates subsystem query.

Parameters:
selectedContext - the selectedContext to set

getSelectedDevice

public java.lang.String getSelectedDevice()
Returns the selected device.

Returns:
the selectedDevice

setSelectedDevice

public void setSelectedDevice(java.lang.String selectedDevice)
Selects a device and intiates property names query.

Parameters:
selectedDevice - the selectedDevice to set

getSelectedProperty

public java.lang.String getSelectedProperty()
Returns the selected property.

Returns:
the selectedProperty

setSelectedProperty

public void setSelectedProperty(java.lang.String selectedProperty)
Selects the property and reinitiates the device name query for potential reversed hierarchy.

Parameters:
selectedProperty - the selectedProperty to set

getSelectedServer

public java.lang.String getSelectedServer()
Returns the selected server.

Returns:
the selectedServer

setSelectedServer

public void setSelectedServer(java.lang.String selectedServer)
Selects the device server and initiates device and property name queryies.

Parameters:
selectedServer - the selectedServer to set

getSelectedProtocol

public java.lang.String getSelectedProtocol()
Returns the selected protocol.

Returns:
the selectedProtocol

setSelectedProtocol

public void setSelectedProtocol(java.lang.String selectedProtocol)
Selects a device protocol and initiates qontext search.

Parameters:
selectedProtocol - the selectedProtocol to set

getAvailableContexts

public java.lang.String[] getAvailableContexts()
Returns all available contexts loaded from remote server.

Returns:
the availableContexts

getAvailableDevices

public java.lang.String[] getAvailableDevices()
Returns all available devices loaded from remote server.

Returns:
the availableDevices

getAvailableProperties

public java.lang.String[] getAvailableProperties()
Returns all available properties loaded from remote server.

Returns:
the availableProperties

getAvailableServers

public java.lang.String[] getAvailableServers()
Returns all available servers loaded from remote server.

Returns:
the availableServers

firePropertyChange

protected void firePropertyChange(java.lang.String name,
                                  java.lang.Object oldValue,
                                  java.lang.Object newValue)

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String name,
                                      java.beans.PropertyChangeListener l)
Adds a PropertyChangeListener and assigns it to listen to a specific property.

Parameters:
name - the name of the property
l - the listener to be added

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String name,
                                         java.beans.PropertyChangeListener l)
Removes a PropertyChangeListener from listening a specific property.

Parameters:
name - the name of the property that the listener has been listening to
l - the listener to be removed

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a PropertyChangeListener for all properties.

Parameters:
l - listener to be added

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes a PropertyChangeListener.

Parameters:
l - listener to be removed

getAvailableSubsystems

public java.lang.String[] getAvailableSubsystems()
Returns all available subsystems loaded from the remote server.

Returns:
available subsystems

getAvailableProtcols

public java.lang.String[] getAvailableProtcols()
Returns all available protocols.

Returns:
the availableProtcols

addQueryListener

public void addQueryListener(QueryListener l)
Adds a QueryListener which receives notifications when query is started or finished.

Parameters:
l - listener to be added

removeQueryListener

public void removeQueryListener(QueryListener l)
Removes a QueryListener.

Parameters:
l - listener to be removed

fireQueryStarted

protected void fireQueryStarted(java.lang.String process)

fireQueryFinished

protected void fireQueryFinished(java.lang.String process)

getRemoteName

public java.lang.String getRemoteName()
Returns the remote name constructed from the selected parameters.

Returns:
the remote name

isShowStockProperties

public boolean isShowStockProperties()
Returns a flag if stock properties should also be loaded at the same time when properties are loaded.

Returns:
the showStockProperties

setShowStockProperties

public void setShowStockProperties(boolean showStockProperties)
Sets the stock properties flag. If true stock properties will be loaded together with normal properties.

Parameters:
showStockProperties - the showStockProperties to set

getSelectedSubSystem

public java.lang.String getSelectedSubSystem()
Returns the selected subsystem.

Returns:
the selectedSubSystem

setSelectedSubSystem

public void setSelectedSubSystem(java.lang.String selectedSubSystem)
Selects the subsystem and initiates server query.

Parameters:
selectedSubSystem - the selectedSubSystem to set

setAccessRate

public void setAccessRate(int value)
Sets the access rate.

Parameters:
value - new access rate in millis

getAccessRate

public int getAccessRate()
Returns the access rate.

Returns:
the access rate

setAccessMode

public void setAccessMode(AccessMode mode)
Sets the access mode.

Parameters:
mode - new access mode

getAccessMode

public AccessMode getAccessMode()
Returns selected access mode.

Returns:
the access mode

addExceptionListener

public void addExceptionListener(ExceptionListener l)
Adds an ExceptionListener which receives notifications of all exceptions that occured while queries were performed.

Parameters:
l - listener to be added

removeExceptionListener

public void removeExceptionListener(ExceptionListener l)
Removes an ExceptionListener.

Parameters:
l - listener to be removed


Copyright © 2010. All Rights Reserved.