Package com.cysols.iodef.rid

This package provides interfaces of the RID query-response sequence such as Generation, Processing and Consumption.

See:
          Description

Interface Summary
RIDQueryGenerator This interface provides RID element instance and IODEF document instance for RID Query.
RIDQueryProcess This interface defines the process of RID query-response and handling logic of the result.
Its concrete class must send the RID query based on the IODEFDocument and RID element and call RIDResultConsumer.accept method with the necessary argument.
RIDResultConsumer This interface provides the method to handle the result of RID query.
 

Package com.cysols.iodef.rid Description

This package provides interfaces of the RID query-response sequence such as Generation, Processing and Consumption. Firstly, IODEF document instance and RID element instance are generated by RIDQueryGenerator. Next, RIDQueryProcess is called with IODEF document instance, RID element instance and RIDResultConsumer instance. "accept" method of RIDResultConsumer is called in the query method of RIDQueryProcess through the RID query-response transaction.

(e.g.)

    RIDQueryGenerator generator = new MyRIDQueryGenerator();
    IODEFDocument iodef = generator.generateIODEF(Object);
    RID rid = genegator.generateRID(incidentID, Object);

    RIDQueryProcess process = new MyRIDQueryProcess();
    RIDResultConsumer consumer = new MyRIDResultConsumer();
    
    process.query(iodef, rid, consumer);

class MyRIDQueryProcess {
   public void query(IODEFDocument iodef, RID rid, RIDResultConsumer consumer) {
        Sending and handling RID Query....

        Preparing the Object in which the result instances, success or failure or something
        consumer.accept(Object obj);
   }
 }
 
 class MyRIDResultConsumer {
   public void accept(Object obj) {
       Picking up the result object from obj
       do post-processing.
   }
 }