public abstract class SimpleDataSource extends DataSource
Modifier and Type | Class and Description |
---|---|
static class |
SimpleDataSource.NameEditorData
Pandering to the needs of the property editor.
|
DataSource.Writable
Modifier and Type | Field and Description |
---|---|
boolean |
customTimer
A variable that indicates we need our own Timer.
|
static int |
EXPORT_READ_ONLY
Export this instance read-only to, for example, OPC.
|
static int |
EXPORT_READ_WRITE
Export this instance read-write to, for example, OPC.
|
static int |
NO_EXPORT
Don't export this instance to, for example, OPC.
|
static boolean |
requiresSyncWrite
When this is true, and we are using auth and containers, then only one person
can update a server at a time.
|
Timer |
sharedTimer
the Timer for this data source
|
static int |
syncWriteTimeout
This is the number of seconds that we will wait before a person who is
sync'd to write will hold the write ability.
|
double |
timebase
the time, in seconds, between updates of this data source to its connectors
|
autoSuspend, AUTOSUSPEND_DEFAULT, AUTOSUSPEND_NEVER, AUTOSUSPEND_NO_LISTENERS, AUTOSUSPEND_NO_LISTENERS_AND_NO_SOURCES, colorHi, colorHiHi, colorLo, colorLoLo, colorNormal, connectors, consoleLogger, currentColor, currentValue, debugLevel, DEFAULT_AUTOSUSPEND, dontConnect, gwtLog, hardSuspended, popupLogger, PRIMARYOUTPORTNAME, sendColors, stopped, suspended, timedPopupLogger, traceLogger, valueHi, valueHiHi, valueLo, valueLoLo
Constructor and Description |
---|
SimpleDataSource()
Required no-arg constructor.
|
SimpleDataSource(java.lang.String portName)
Generic constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addConnector(Connector connector)
Adds an input Connector to this component from the primary outport
of a data source.
|
void |
addConnector(java.lang.String outportName,
Connector connector)
Adds an input Connector to this component from a specified outport of a data source.
|
void |
addDataSource(DataSource dataSource)
Sets the data source with the given Name.
|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
The specified PropertyChangeListeners vetoableChange method will
be called each time the value of any constrained property is changed.
|
void |
addValueChangedListener(java.lang.Object listener)
Creates a connector from the default outport of this server to the
method called "valueInput" of the provided object.
|
void |
addVetoableChangeListener(java.beans.VetoableChangeListener l)
The specified VetoableChangeListeners vetoableChange method will
be called each time the value of any constrained property is changed.
|
ValueObjectInterface |
authenticatedClientRequest(java.lang.String request,
int requestId,
ValueObjectInterface value)
This method is called by a client, potentially over the net, to perform some operation.
|
ValueObjectInterface |
clientRequest(java.lang.String target,
java.lang.String request,
int requestId,
ValueObjectInterface value)
This is an others to contact the server.
|
void |
clientResponse(java.lang.String request,
int requestId,
ValueObjectInterface value)
The response to a client request.
|
void |
destroy()
Stops the data source.
|
void |
determineSuspendedStatus()
This method will actually set the suspended status with a call to
super.determineSuspendedStatus()
and then enable or disable the timebase depending upon the suspend status. |
static TargetLicenseManager |
getClassLicenseManager() |
DataSourceContainer |
getContainer()
If this datasource has a parent, then the parent's container is returned, otherwise null.
|
boolean |
getCustomTimer()
if we need our own Timer.
|
DataSource |
getDataSource(java.lang.String name)
Returns the data source with the given Name.
|
java.util.Enumeration<DataSource> |
getDataSources()
Returns the enumeration of data sources.
|
java.lang.String |
getDisplayName() |
int |
getExportCriteria() |
int |
getExposeComponentConnections() |
java.lang.String |
getName()
Returns the data source name.
|
java.util.Enumeration<java.lang.String> |
getOutPortNames()
Returns a list of all the available outports.
|
java.lang.String |
getPullFromServers() |
SimpleDataSource.NameEditorData |
getPushData()
Returns the name of the server we will push to.
|
java.lang.String |
getPushName()
Returns the name of the server we will push to.
|
java.lang.String |
getPushToServers()
Returns the name of the server we will push to.
|
SimpleDataSource.NameEditorData |
getServerListData()
Returns the name of the server we will push to.
|
double |
getTimebase()
Accesses the timebase of the server.
|
boolean |
getTrace()
Returns the trace flag.
|
boolean |
isActive()
This method will return true if the server is active.
|
boolean |
isScreenLocal()
This flag hints that this bean should be generated such that it is
connected only to the particular screen and that changes made to it
will remain local to that screen.
|
void |
refreshCurrentValue()
This method is overridden by subclasses to provide the data values.
|
void |
removeConnector(java.lang.String outportName,
Connector connector)
Removes a listener, typically a bean or other data source, from a data source.
|
void |
removeDataSource(java.lang.String dataSourceName)
Removes the data source with the given Name.
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Remove this PropertyChangeListener from the internal list.
|
void |
removeValueChangedListener(java.lang.Object listener)
Removes the object as a listener to this component.
|
void |
removeVetoableChangeListener(java.beans.VetoableChangeListener l)
Remove this VetoableChangeListener from the internal list.
|
static boolean |
requestSyncWrite(java.lang.String user) |
void |
setAutoSuspend(int newValue)
This method will set the auto suspend status of all the
data sources, this and the children, to the new value.
|
static void |
setClassLicenseManager(TargetLicenseManager classLicenseManager) |
void |
setContainer(DataSourceContainer container) |
void |
setCustomTimer(boolean newValue)
if we need our own Timer.
|
void |
setDataSourceName(java.lang.String dataSourceName)
This method will change the name that is associated with the primary data source of this component.
|
void |
setExportCriteria(int exportCriteria) |
void |
setExposeComponentConnections(int exposeComponentConnectionCriteria) |
void |
setName(java.lang.String name)
This method will change the name that is associated with this server.
|
void |
setPullFromServers(java.lang.String serverList) |
void |
setPushData(SimpleDataSource.NameEditorData pushData)
Set the tag name for the server we will push to.
|
void |
setPushName(java.lang.String pushTagName)
Set the tag name for the server we will push to.
|
void |
setPushToServers(java.lang.String pushTagName)
Set the tag name for the server we will push to.
|
void |
setScreenLocal(boolean clientBean)
This flag hints that this bean should be generated such that it is
connected only to the particular screen and that changes made to it
will remain local to that screen.
|
void |
setServerListData(SimpleDataSource.NameEditorData pushData)
Set the tag name for the server we will push to.
|
void |
setTimebase(double newValue)
Sets the timebase of the server in seconds.
|
void |
setTrace(boolean flag)
Sets the trace flag.
|
void |
setValueObject(ValueObjectInterface newValue)
Sets the value of this object as a ValueObject.
|
void |
start()
By default this method will call
resume . |
void |
stop()
By default this method will call
suspend . |
void |
tick(Timer timer)
The heartbeat of the data source.
|
java.lang.String |
toString()
Provides the description and status of the server as a String.
|
void |
VIBEvent(VIBEvent vibEvent)
We are interested in few events.
|
addVIBEventListener, checkScript, executeInScriptInternal, executeScript, executeScriptInternal, executeScriptInternal, getAutoSuspend, getBooleanValue, getBoolValue, getColorHi, getColorHiHi, getColorLo, getColorLoLo, getColorNormal, getConnectors, getConsoleLogger, getCurrentColor, getDataSourceName, getDoubleValue, getFloatValue, getGWTLogger, getIncomingValueObject, getInScript, getIntValue, getLongValue, getParent, getPopupLogger, getScript, getScriptEngine, getSendColors, getSources, getStringValue, getSyncWriteTimeout, getTimedPopupLogger, getTraceLogger, getValueHi, getValueHiHi, getValueLo, getValueLoLo, getValueObject, init, isHardSuspended, isRunning, isSendOnlyChangedValuesDefault, isSuspended, logException, logGWT, logGWT, logMessage, logTrace, n2sortConnectors, performScriptSubstitutions, popupMessage, post, removeConnector, removeVIBEventListener, replaceConnectors, scriptExtensionSubstition, setColorHi, setColorHiHi, setColorLo, setColorLoLo, setColorNormal, setConsoleLogger, setGWTLogger, setHardSuspended, setInScript, setParent, setPopupLogger, setScript, setSendColors, setSendOnlyChangedValuesDefault, setSyncWriteTimeout, setTimedPopupLogger, setTraceLogger, setValueHi, setValueHiHi, setValueLo, setValueLoLo, updateColor, updateListeners, updateListeners, updateListeners, whoAmI
public boolean customTimer
public static int EXPORT_READ_ONLY
public static int EXPORT_READ_WRITE
public static int NO_EXPORT
public static boolean requiresSyncWrite
public Timer sharedTimer
public static int syncWriteTimeout
public double timebase
public SimpleDataSource()
public SimpleDataSource(java.lang.String portName)
public void addConnector(Connector connector) throws BadParameterException, VIBUpdateFailedException
addConnector
in class DataSource
connector
- the connector to be added.BadParameterException
- if the targetMethodName does not exist in the listener, or is notVIBUpdateFailedException
- if an update of the connector (by a subclass of this object) fails.#removeaddConnector
public void addConnector(java.lang.String outportName, Connector connector) throws BadParameterException, VIBUpdateFailedException
addConnector
in class DataSource
listener
- the listener to be added.dataSourceName
- the name of the data sourcetargetMethodName
- the name of the target methodBadParameterException
- if the targetMethodName does not exist in the listener, or is notVIBUpdateFailedException
- if an update of the connector (by a subclass of this object) fails.#removeListener
public void addDataSource(DataSource dataSource) throws BadParameterException
BadParameterException
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
l
- the PropertyChangeListenerremovePropertyChangeListener(java.beans.PropertyChangeListener)
public void addValueChangedListener(java.lang.Object listener)
listener
- the target of this serverpublic void addVetoableChangeListener(java.beans.VetoableChangeListener l)
l
- the VetoableChangeListenerremoveVetoableChangeListener(java.beans.VetoableChangeListener)
public ValueObjectInterface authenticatedClientRequest(java.lang.String request, int requestId, ValueObjectInterface value) throws VIBUpdateFailedException
VIBUpdateFailedException
public ValueObjectInterface clientRequest(java.lang.String target, java.lang.String request, int requestId, ValueObjectInterface value) throws VIBUpdateFailedException, BadParameterException
clientRequest
in class DataSource
request
- the request string which is interpreted by any serverrequestId
- the id of the request that should be returned in any response.value
- the value associated with this request. This may be null.BadParameterException
VIBUpdateFailedException
- thrown if the server cannot fulfil the request.public void clientResponse(java.lang.String request, int requestId, ValueObjectInterface value) throws VIBUpdateFailedException
VIBUpdateFailedException
public void destroy() throws BadParameterException
destroy
in class DataSource
BadParameterException
#suspend
public void determineSuspendedStatus()
super.determineSuspendedStatus()
and then enable or disable the timebase depending upon the suspend status. This method adds a check for push tags.determineSuspendedStatus
in class DataSource
newValue
- the suspension state to set#setSuspended
,
setAutoSuspend(int)
public static TargetLicenseManager getClassLicenseManager()
public DataSourceContainer getContainer()
DataSource
getContainer
in class DataSource
public boolean getCustomTimer()
public DataSource getDataSource(java.lang.String name) throws BadParameterException
BadParameterException
public java.util.Enumeration<DataSource> getDataSources()
public java.lang.String getDisplayName()
public int getExportCriteria()
public int getExposeComponentConnections()
public java.lang.String getName()
DataSource
getName
in class DataSource
public java.util.Enumeration<java.lang.String> getOutPortNames()
public java.lang.String getPullFromServers()
public SimpleDataSource.NameEditorData getPushData()
public java.lang.String getPushName()
public java.lang.String getPushToServers()
public SimpleDataSource.NameEditorData getServerListData()
public double getTimebase()
setTimebase(double)
public boolean getTrace()
public boolean isActive()
public boolean isScreenLocal()
public void refreshCurrentValue()
public void removeConnector(java.lang.String outportName, Connector connector) throws BadParameterException
listener
- the listener to be removed.dataSourceName
- the name of the data sourceBadParameterException
- thrown if the datasource name does not refer to a valid data source.addValueChangedListener(java.lang.Object)
,
ValueChangedEvent
public void removeDataSource(java.lang.String dataSourceName) throws BadParameterException
BadParameterException
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
l
- the PropertyChangeListeneraddPropertyChangeListener(java.beans.PropertyChangeListener)
public void removeValueChangedListener(java.lang.Object listener)
listener
- the target of this server to removepublic void removeVetoableChangeListener(java.beans.VetoableChangeListener l)
l
- the VetoableChangeListeneraddVetoableChangeListener(java.beans.VetoableChangeListener)
public static boolean requestSyncWrite(java.lang.String user)
public void setAutoSuspend(int newValue)
setAutoSuspend
in class DataSource
newValue
- the autosuspend settingDataSource.setAutoSuspend(int)
public static void setClassLicenseManager(TargetLicenseManager classLicenseManager)
classLicenseManager
- the classLicenseManager to setpublic void setContainer(DataSourceContainer container) throws BadParameterException
container
- The container to set.BadParameterException
public void setCustomTimer(boolean newValue)
newValue
- A variable that indicates we need our own Timer.public void setDataSourceName(java.lang.String dataSourceName)
setDataSourceName
in class DataSource
newTagName
- the new tag name#getTagName
public void setExportCriteria(int exportCriteria)
exportCriteria
- the exportCriteria to setpublic void setExposeComponentConnections(int exposeComponentConnectionCriteria)
exportCriteria
- the ExposeComponentConnections to setpublic void setName(java.lang.String name) throws BadParameterException
newTagName
- the new tag nameBadParameterException
#getTagName
public void setPullFromServers(java.lang.String serverList) throws BadParameterException, VIBUpdateFailedException
serverList
- BadParameterException
VIBUpdateFailedException
public void setPushData(SimpleDataSource.NameEditorData pushData) throws BadParameterException, VIBUpdateFailedException
public void setPushName(java.lang.String pushTagName) throws BadParameterException, VIBUpdateFailedException
public void setPushToServers(java.lang.String pushTagName) throws BadParameterException, VIBUpdateFailedException
public void setScreenLocal(boolean clientBean)
public void setServerListData(SimpleDataSource.NameEditorData pushData) throws BadParameterException, VIBUpdateFailedException
public void setTimebase(double newValue)
newValue
- the timebase of the servergetTimebase()
public void setTrace(boolean flag)
public void setValueObject(ValueObjectInterface newValue) throws VIBUpdateFailedException
newValue
- the new ValueObject value for the serverVIBUpdateFailedException
ValueObject
public void start() throws BadParameterException, VIBUpdateFailedException
resume
. At deployment
this method is called after all components have been instantiated, all
connections have been made and the system is ready to run.start
in class DataSource
BadParameterException
VIBUpdateFailedException
public void stop() throws BadParameterException
suspend
.stop
in class DataSource
BadParameterException
public void tick(Timer timer)
refreshCurrentValue
method to be
called. The method will be called even if the datasource is suspended
(either hard or soft).timer
- the timerpublic java.lang.String toString()
toString
in class DataSource
public void VIBEvent(VIBEvent vibEvent) throws BadParameterException
VIBEvent
in class DataSource
BadParameterException
Copyright © 1999-2025 ErgoTech Systems, Inc. All Rights Reserved.