amwebarsentitlementservice.protocol
Class exampleProtocol

java.lang.Object
  |
  +--amwebarsentitlementservice.protocol.AMWebARSProtocol
        |
        +--amwebarsentitlementservice.protocol.FixedProviderProtocol
              |
              +--amwebarsentitlementservice.protocol.exampleProtocol
All Implemented Interfaces:
java.lang.Cloneable

public class exampleProtocol
extends FixedProviderProtocol


Fields inherited from class amwebarsentitlementservice.protocol.FixedProviderProtocol
PROTOCOL_INIT_SUCCESS, PROTOCOL_RUN_SUCCESS, PROTOCOL_SHUTDOWN_SUCCESS
 
Fields inherited from class amwebarsentitlementservice.protocol.AMWebARSProtocol
_initialized, CLASS_NAME_XML_NAME, PROTOCOL_ID_XML_NAME, PROTOCOL_XML_NAME
 
Constructor Summary
exampleProtocol(java.lang.String protocol_id)
          Constructor for exampleProtocol.
 
Method Summary
 ProtocolInitStatus initialize()
          Initializes the protocol.
 ProtocolRunStatus run()
          Runs the protocol.
 ProtocolShutdownStatus shutdown()
           
 
Methods inherited from class amwebarsentitlementservice.protocol.FixedProviderProtocol
clone, generateMemento, getPreferedFactory, setMemento
 
Methods inherited from class amwebarsentitlementservice.protocol.AMWebARSProtocol
equals, getClient, getInstance, getProtocolID, isInitialized, setClient, toString, toXML
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

exampleProtocol

public exampleProtocol(java.lang.String protocol_id)
Constructor for exampleProtocol.
Parameters:
protocol_id -  
Method Detail

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:
  1. Test whether the protocol is initialized. If not, return a new ProtocolRunException with containing an UnsupportedOperationException.
  2. Get the container descriptors to retrieve from the client: getClient().elements();
  3. 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();
  4. 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()