amwebarsentitlementservice.protocol
Class FileReaderProtocol
java.lang.Object
|
+--amwebarsentitlementservice.protocol.AMWebARSProtocol
|
+--amwebarsentitlementservice.protocol.FixedProviderProtocol
|
+--amwebarsentitlementservice.protocol.FileReaderProtocol
- All Implemented Interfaces:
- java.lang.Cloneable
- public class FileReaderProtocol
- extends FixedProviderProtocol
Constructor Summary |
FileReaderProtocol(java.lang.String protocol_id)
Constructor for FileReaderProtocol. |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
CONTAINER_DB_FILENAME
public static final java.lang.String CONTAINER_DB_FILENAME
KEY_DELIMETER
public static final java.lang.String KEY_DELIMETER
FileReaderProtocol
public FileReaderProtocol(java.lang.String protocol_id)
- Constructor for FileReaderProtocol.
- Parameters:
protocol_id
-
initialize
public ProtocolInitStatus initialize()
- Description copied from class:
AMWebARSProtocol
- Initializes the protocol. This has to be done before the protocol runs.
- Overrides:
initialize
in class AMWebARSProtocol
- See Also:
AMWebARSProtocol.initialize()
run
public ProtocolRunStatus run()
- Description copied from class:
AMWebARSProtocol
- Runs the protocol. A protocol's run method has to do the following steps:
- Test whether the protocol is initialized. If not, return a new ProtocolRunException with containing
an UnsupportedOperationException.
- Get the container descriptors to retrieve from the client: getClient().elements();
- Retrieve the containers. If one is found remove the corresponding descriptor
from the client's descriptor iterator and add the container to the
client:
getClient().addContainer(retrieved_container);
container_descriptors.remove();
- return PROTOCOL_RUN_SUCCESS; if any exception occurs return a
new ProtocolRunException.
- Overrides:
run
in class AMWebARSProtocol
- See Also:
AMWebARSProtocol.run()
shutdown
public ProtocolShutdownStatus shutdown()
- Overrides:
shutdown
in class AMWebARSProtocol
- See Also:
AMWebARSProtocol.shutdown()
generateMemento
public AMWebARSProtocolMemento generateMemento()
- Overrides:
generateMemento
in class FixedProviderProtocol
- See Also:
AMWebARSProtocol.generateMemento()
setMemento
public void setMemento(AMWebARSProtocolMemento memento)
- Overrides:
setMemento
in class FixedProviderProtocol
- See Also:
AMWebARSProtocol.setMemento(AMWebARSProtocolMemento)