|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object hep.aida.ref.remote.RemoteMutableStore
This is Basic implementation of Read-Only IDevMutableStore. It has extra methods that allow to change state of the tree and to create IManagedObject in that tree and update its data. This implementation creates appropriate subclass of RemoteClient to connect to a remote server. All subclasses need to implement 3 methods: protected RemoteClient createClient(Map options); public IManagedObject createObject(String name, String type); public void updateData(String path, String type);
Nested Class Summary | |
class |
RemoteMutableStore.ReadThread
|
Field Summary | |
protected RemoteClient |
client
|
protected RemoteUpdateEvent[] |
events
|
protected boolean |
hurry
|
protected boolean |
initDone
|
protected boolean |
recursive
|
protected Logger |
remoteLogger
|
protected IDevTree |
tree
|
Constructor Summary | |
RemoteMutableStore()
Creates a new instance of BasicMutableStore. |
|
RemoteMutableStore(boolean hurry)
|
|
RemoteMutableStore(IDevTree tree)
|
|
RemoteMutableStore(IDevTree tree,
boolean hurry)
|
Method Summary | |
void |
close()
Close Store and free all resources associated with it. |
void |
commit(IDevTree tree,
Map options)
Copy data from Tree to the Store. |
protected abstract RemoteClient |
createClient(Map options)
|
abstract hep.aida.IManagedObject |
createObject(String name,
String aidaType)
Create an IManagedObject that can be later updated. |
protected void |
executeStateChanged(AidaUpdateEvent event)
|
protected void |
executeStateChanged(int id,
String path,
String type,
String xType)
|
void |
handleDataUpdate(hep.aida.IManagedObject mo,
String path,
String type)
|
void |
handleDataUpdate(hep.aida.IManagedObject mo,
String path,
String type,
boolean hurryUp)
|
void |
init()
|
boolean |
isReadOnly()
Returns true if the store only supports reading. |
static void |
main(String[] args)
|
void |
read(IDevTree tree,
Map options,
boolean readOnly,
boolean createNew)
Populate AIDA Tree: create appropriate AIDA objects in the Tree and fill them with data from the Store. |
void |
read(IDevTree tree,
String path)
Populate folder or create AIDA object in the tree. |
void |
reloadFolder(String path)
|
protected void |
reloadWebPage()
|
void |
setHurry(boolean hurry)
|
void |
stateChanged(AidaUpdateEvent event)
This method actually does the job of modifying the client tree. |
abstract void |
updateData(String path,
String type)
Initiates the process of updating content for an IManagedObject. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected IDevTree tree
protected RemoteClient client
protected boolean initDone
protected boolean recursive
protected RemoteUpdateEvent[] events
protected Logger remoteLogger
protected boolean hurry
Constructor Detail |
public RemoteMutableStore()
public RemoteMutableStore(boolean hurry)
public RemoteMutableStore(IDevTree tree)
public RemoteMutableStore(IDevTree tree, boolean hurry)
Method Detail |
public void init()
public void setHurry(boolean hurry)
public void handleDataUpdate(hep.aida.IManagedObject mo, String path, String type) throws IllegalArgumentException
IllegalArgumentException
public void handleDataUpdate(hep.aida.IManagedObject mo, String path, String type, boolean hurryUp) throws IllegalArgumentException
IllegalArgumentException
protected abstract RemoteClient createClient(Map options)
public abstract void updateData(String path, String type) throws IllegalArgumentException
IDevMutableStore
updateData
in interface IDevMutableStore
path
- The path to the object which is to be updated.type
- Type of object (this parameter does not have to be used).
IllegalArgumentException
- If the path does not exist, or if it is a directory.public abstract hep.aida.IManagedObject createObject(String name, String aidaType) throws IllegalArgumentException
IDevMutableStore
createObject
in interface IDevMutableStore
name
- Simple name of an object which is to be created, no directories.aidaType
- Type of object.
IllegalArgumentException
- If unknown type.public void close() throws IOException
IStore
close
in interface IStore
IOException
public void commit(IDevTree tree, Map options) throws IOException
IStore
commit
in interface IStore
IOException
- If there are problems writing to the Store or the Store is Read-Only.public boolean isReadOnly()
IStore
isReadOnly
in interface IStore
public void reloadFolder(String path) throws IllegalArgumentException, IOException
IllegalArgumentException
IOException
public void read(IDevTree tree, String path) throws IllegalArgumentException, IOException
IOnDemandStore
read
in interface IOnDemandStore
path
- The path to the diretory which is to be filled.
IllegalArgumentException
- If the path does not exist, or if it is not a directory.
IOException
- If there are problems reading from the Storepublic void read(IDevTree tree, Map options, boolean readOnly, boolean createNew) throws IOException
IStore
read
in interface IStore
IOException
- If there are problems reading from the Storepublic void stateChanged(AidaUpdateEvent event)
stateChanged
in interface AidaUpdatable
protected void executeStateChanged(AidaUpdateEvent event)
protected void executeStateChanged(int id, String path, String type, String xType)
protected void reloadWebPage()
public static void main(String[] args)
|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |