org.gcube.common.core.persistence
Class GCUBEWSLiteFilePersistenceDelegate<LOCAL extends GCUBELocalResource,RESOURCE extends GCUBEWSLiteResource<LOCAL>>
java.lang.Object
org.gcube.common.core.persistence.GCUBEPersistenceDelegate<RESOURCEID,RESOURCE>
org.gcube.common.core.persistence.GCUBEFilePersistenceDelegate<GCUBEWSResourceKey,RESOURCE>
org.gcube.common.core.persistence.GCUBEWSFilePersistenceDelegate<RESOURCE>
org.gcube.common.core.persistence.GCUBEWSLiteFilePersistenceDelegate<LOCAL,RESOURCE>
- Type Parameters:
RESOURCE - the type of the GCUBEWSResourceLite manager by the delegatate.
public class GCUBEWSLiteFilePersistenceDelegate<LOCAL extends GCUBELocalResource,RESOURCE extends GCUBEWSLiteResource<LOCAL>>
- extends GCUBEWSFilePersistenceDelegate<RESOURCE>
Specialisation of GCUBEWSFilePersistenceDelegate for GCUBEWSResourceLite.
- Author:
- Fabio Simeoni (University of Strathclyde).
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WSLITE_FILE_SUFFIX
protected static final String WSLITE_FILE_SUFFIX
- The suffix of file serialisation of resource.
- See Also:
- Constant Field Values
GCUBEWSLiteFilePersistenceDelegate
public GCUBEWSLiteFilePersistenceDelegate()
initialise
public void initialise(GCUBEResourceHome<? super GCUBEWSResourceKey,GCUBEWSResourceKey,RESOURCE> home)
throws Exception
- Initialises the delegate from the
GCUBEResourceHome of the associated resources.
- Overrides:
initialise in class GCUBEWSFilePersistenceDelegate<RESOURCE extends GCUBEWSLiteResource<LOCAL>>
- Parameters:
home - the home.
- Throws:
Exception - if the delegate could not be initialised.
onLoad
protected void onLoad(RESOURCE resource,
ObjectInputStream stream)
throws Exception
- Deserialises the state of resource from a
ObjectInputStream.
Extends in accordance with resource semantics.
- Overrides:
onLoad in class GCUBEWSFilePersistenceDelegate<RESOURCE extends GCUBEWSLiteResource<LOCAL>>
stream - the stream.
- Throws:
Exception - if the stream could not be processed.
onStore
public void onStore(RESOURCE resource)
throws Exception
- Invoked by
GCUBEPersistenceDelegate.store(GCUBEStatefulResource) to serialise a resource.
Implement in accordance with serialisation and resource semantics.
- Overrides:
onStore in class GCUBEFilePersistenceDelegate<GCUBEWSResourceKey,RESOURCE extends GCUBEWSLiteResource<LOCAL>>
- Throws:
Exception - if the resource could not be serialised.- See Also:
GCUBEPersistenceDelegate.store(GCUBEStatefulResource)
onStore
protected void onStore(RESOURCE resource,
ObjectOutputStream stream)
throws Exception
- Serialises the state of a resource into a
ObjectOutputStream.
Extend in accordance with resource semantics.
- Overrides:
onStore in class GCUBEWSFilePersistenceDelegate<RESOURCE extends GCUBEWSLiteResource<LOCAL>>
stream - the stream.
- Throws:
Exception - if the stream could not be processed.
getSuffix
protected String getSuffix()
- Returns the suffix for resource file serialisations.
- Overrides:
getSuffix in class GCUBEWSFilePersistenceDelegate<RESOURCE extends GCUBEWSLiteResource<LOCAL>>
- Returns:
- the suffix
Copyright © 2012. All Rights Reserved.