|
Remote System Explorer DataStore Release 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.eclipse.dstore.core.server.SecuredThread
org.eclipse.dstore.core.model.Handler
org.eclipse.dstore.core.miners.Miner
public abstract class Miner
Miner is the abstract base class of all DataStore extensions). The DataStore framework knows how to load and route commands to miners because it interfaces miners through the restricted set of interfaces declared here. To add a new miner, developers must extend this class and implement the abstract methods declared here. This class and its subclasses are not intended to be instantiated by clients. The dstore server infrastructure will take care of loading the Miner.
Field Summary | |
---|---|
protected List |
_commandQueue
|
protected ArrayList |
_dependencies
|
DataElement |
_minerData
|
DataElement |
_minerElement
|
DataElement |
_minerTransient
|
protected String |
_name
|
protected ResourceBundle |
_resourceBundle
|
protected String |
_value
|
Fields inherited from class org.eclipse.dstore.core.model.Handler |
---|
_keepRunning, _waitIncrement |
Fields inherited from class org.eclipse.dstore.core.server.SecuredThread |
---|
_dataStore |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
protected |
Miner()
Creates a new Miner |
Method Summary | |
---|---|
protected DataElement |
command(DataElement command)
Issues a specified command on this miner from the DataStore framework. |
DataElement |
createAbstractCommandDescriptor(DataElement descriptor,
String name,
String value)
Creates an abstract command descriptor. |
DataElement |
createAbstractObjectDescriptor(DataElement descriptor,
String name)
Creates an abstract object descriptor. |
DataElement |
createAbstractObjectDescriptor(DataElement descriptor,
String name,
String source)
Creates an abstract object descriptor. |
DataElement |
createAbstractRelationship(DataElement from,
DataElement to)
Creates an abstract relationship between two descriptors. |
DataElement |
createCommandDescriptor(DataElement descriptor,
String name,
String value)
Creates a command descriptor. |
DataElement |
createCommandDescriptor(DataElement descriptor,
String name,
String value,
boolean visible)
Creates a command descriptor. |
DataElement |
createObjectDescriptor(DataElement descriptor,
String name)
Creates a object descriptor. |
DataElement |
createObjectDescriptor(DataElement descriptor,
String name,
String source)
Creates a object descriptor. |
DataElement |
createReference(DataElement from,
DataElement to)
Creates a contents relationship between any two elements. |
DataElement |
createRelationDescriptor(DataElement descriptor,
String name)
Creates a new type of relationship descriptor. |
void |
finish()
Shuts down the miner and cleans up it's meta-information. |
DataElement |
getCommandArgument(DataElement command,
int arg)
Returns the argument of a command specified at a given index. |
String |
getCommandName(DataElement command)
Returns the name of a command. |
DataElement |
getCommandStatus(DataElement command)
Returns the status of a command. |
protected ArrayList |
getDependencies()
|
IExternalLoader |
getExternalLoader()
Implement this to returns the external class loader for this extender implementation. |
DataElement |
getMinerData()
Returns the element that contains this miners meta-information. |
ArrayList |
getMinerDependencies()
Returns the qualified names of all miners that this miner depends on. |
DataElement |
getMinerElement()
Returns the element that represents this miner. |
String |
getMinerName()
Returns the qualified name of this miner |
DataElement |
getMinerTransient()
Returns the transient object container for this element. |
int |
getNumberOfCommandArguments(DataElement command)
Returns the number of arguments for this command. |
ResourceBundle |
getResourceBundle()
Interface to retrieve an NL enabled resource bundle. |
DataElement |
getSchemaRoot()
Returns the descriptor root for the DataStore schema |
String |
getValue()
Returns the name of this miner |
abstract String |
getVersion()
Returns the version of this miner The expected format for this is " |
void |
handle()
Implemented to provide the periodic activity to be done in a handler. |
abstract DataElement |
handleCommand(DataElement theCommand)
Handle commands that are routed to this miner. |
void |
initMiner(DataElement status)
|
boolean |
isConnected()
Indicates whether the miner has been connected to the DataStore yet. |
boolean |
isInitialized()
Indicates whether the miner has been initialized yet |
protected void |
load()
Default method that gets called on a Miner when it is loaded. |
protected void |
load(DataElement status)
Default method that gets called on a Miner when it is loaded. |
void |
makeTransient(DataElement objectDescriptor)
Identifies a give object descriptor type to be transient in this miner. |
void |
requestCommand(DataElement command)
|
void |
setDataStore(DataStore dataStore)
Sets the DataStore and performs some fundamental initialization for this miner. |
void |
setExternalLoader(IExternalLoader loader)
|
protected void |
updateMinerInfo()
This gets called after a miner is initialized. |
void |
waitForInput()
Causes the current thread to wait until this class request has been fulfilled. |
Methods inherited from class org.eclipse.dstore.core.model.Handler |
---|
getWaitTime, isFinished, notifyInput, run, setWaitTime |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.dstore.core.model.ISchemaExtender |
---|
extendSchema |
Field Detail |
---|
public DataElement _minerElement
public DataElement _minerData
public DataElement _minerTransient
protected String _name
protected String _value
protected ArrayList _dependencies
protected List _commandQueue
protected ResourceBundle _resourceBundle
Constructor Detail |
---|
protected Miner()
Method Detail |
---|
public final ArrayList getMinerDependencies()
protected ArrayList getDependencies()
public final boolean isInitialized()
public final boolean isConnected()
public void finish()
Subclasses may override this method but must call
super.finish()
at the end of their overriding method.
finish
in class Handler
public ResourceBundle getResourceBundle()
protected void load()
protected void load(DataElement status)
status
- the status of the initialize miner commandprotected void updateMinerInfo()
public final String getMinerName()
public final String getValue()
public final void handle()
Handler
handle
in class Handler
public final void requestCommand(DataElement command)
public final void initMiner(DataElement status)
protected final DataElement command(DataElement command)
command
- the command that has been sent to this miner
public final void setDataStore(DataStore dataStore)
setDataStore
in class Handler
dataStore
- the DataStore that owns this minerpublic final DataElement createAbstractCommandDescriptor(DataElement descriptor, String name, String value)
descriptor
- the parent descriptor for the new descriptorname
- the name of the commandvalue
- the identifier for this command
public final DataElement createCommandDescriptor(DataElement descriptor, String name, String value)
descriptor
- the parent descriptor for the new descriptorname
- the name of the commandvalue
- the identifier for this command
public final DataElement createCommandDescriptor(DataElement descriptor, String name, String value, boolean visible)
descriptor
- the parent descriptor for the new descriptorname
- the name of the commandvalue
- the identifier for this commandvisible
- an indication whether this command descriptor should be visible to an end-user
public final DataElement createAbstractObjectDescriptor(DataElement descriptor, String name)
descriptor
- the parent descriptor for the new descriptorname
- the name of the object type
public final DataElement createAbstractObjectDescriptor(DataElement descriptor, String name, String source)
descriptor
- the parent descriptor for the new descriptorname
- the name of the object typesource
- the plugin location of the miner that owns this object type
public final DataElement createObjectDescriptor(DataElement descriptor, String name)
descriptor
- the parent descriptor for the new descriptorname
- the name of the object type
public final DataElement createObjectDescriptor(DataElement descriptor, String name, String source)
descriptor
- the parent descriptor for the new descriptorname
- the name of the object typesource
- the plugin location of the miner that owns this object type
public final DataElement createRelationDescriptor(DataElement descriptor, String name)
descriptor
- the parent descriptor for the new descriptorname
- the name of the relationship type
public final DataElement createAbstractRelationship(DataElement from, DataElement to)
from
- the abstacting descriptorto
- the descriptor that is abstracted
public final DataElement createReference(DataElement from, DataElement to)
from
- the containing elementto
- the element that is contained
public final DataElement getMinerElement()
public final DataElement getMinerData()
public final DataElement getMinerTransient()
public final void makeTransient(DataElement objectDescriptor)
objectDescriptor
- the object descriptor type that is transientpublic final String getCommandName(DataElement command)
command
- a tree of elements representing a command
public final DataElement getCommandStatus(DataElement command)
command
- a tree of elements representing a command
public final int getNumberOfCommandArguments(DataElement command)
command
- a tree of elements representing a command
public final DataElement getCommandArgument(DataElement command, int arg)
command
- a tree of elements representing a commandarg
- the index into the commands children
public final DataElement getSchemaRoot()
public void setExternalLoader(IExternalLoader loader)
public IExternalLoader getExternalLoader()
ISchemaExtender
getExternalLoader
in interface ISchemaExtender
public void waitForInput()
Handler
waitForInput
in class Handler
public abstract DataElement handleCommand(DataElement theCommand) throws Exception
theCommand
- an instance of a command containing a tree of arguments
Exception
public abstract String getVersion()
|
Remote System Explorer DataStore Release 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |