RESOURCE - the type of the GCUBEWSResourceLite manager by the delegatate.public class GCUBEWSLiteFilePersistenceDelegate<LOCAL extends GCUBELocalResource,RESOURCE extends GCUBEWSLiteResource<LOCAL>> extends GCUBEWSFilePersistenceDelegate<RESOURCE>
GCUBEWSFilePersistenceDelegate for GCUBEWSResourceLite.| Modifier and Type | Field and Description |
|---|---|
protected static String |
WSLITE_FILE_SUFFIX
The suffix of file serialisation of resource.
|
ctxt, WSRESOURCE_FILE_SUFFIXlogger| Constructor and Description |
|---|
GCUBEWSLiteFilePersistenceDelegate() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getSuffix()
Returns the suffix for resource file serialisations.
|
void |
initialise(GCUBEResourceHome<? super GCUBEWSResourceKey,GCUBEWSResourceKey,RESOURCE> home)
Initialises the delegate from the
GCUBEResourceHome of the associated resources. |
protected void |
onLoad(RESOURCE resource,
ObjectInputStream stream)
Deserialises the state of resource from a
ObjectInputStream. |
void |
onStore(RESOURCE resource)
Invoked by
GCUBEPersistenceDelegate.store(GCUBEStatefulResource) to serialise a resource. |
protected void |
onStore(RESOURCE resource,
ObjectOutputStream stream)
Serialises the state of a resource into a
ObjectOutputStream. |
getFileFromResource, getIDFromFileNamegetResourceIdentifiers, getStorageRoot, onLoad, onRemoveload, remove, storeprotected static final String WSLITE_FILE_SUFFIX
public void initialise(GCUBEResourceHome<? super GCUBEWSResourceKey,GCUBEWSResourceKey,RESOURCE> home) throws Exception
GCUBEResourceHome of the associated resources.initialise in class GCUBEWSFilePersistenceDelegate<RESOURCE extends GCUBEWSLiteResource<LOCAL>>home - the home.Exception - if the delegate could not be initialised.protected void onLoad(RESOURCE resource, ObjectInputStream stream) throws Exception
ObjectInputStream.
Extends in accordance with resource semantics.onLoad in class GCUBEWSFilePersistenceDelegate<RESOURCE extends GCUBEWSLiteResource<LOCAL>>stream - the stream.Exception - if the stream could not be processed.public void onStore(RESOURCE resource) throws Exception
GCUBEPersistenceDelegate.store(GCUBEStatefulResource) to serialise a resource.
Implement in accordance with serialisation and resource semantics.onStore in class GCUBEFilePersistenceDelegate<GCUBEWSResourceKey,RESOURCE extends GCUBEWSLiteResource<LOCAL>>Exception - if the resource could not be serialised.GCUBEPersistenceDelegate.store(GCUBEStatefulResource)protected void onStore(RESOURCE resource, ObjectOutputStream stream) throws Exception
ObjectOutputStream.
Extend in accordance with resource semantics.onStore in class GCUBEWSFilePersistenceDelegate<RESOURCE extends GCUBEWSLiteResource<LOCAL>>stream - the stream.Exception - if the stream could not be processed.protected String getSuffix()
getSuffix in class GCUBEWSFilePersistenceDelegate<RESOURCE extends GCUBEWSLiteResource<LOCAL>>Copyright © 2015. All Rights Reserved.