View Javadoc

1   package fulmine.event;
2   
3   import fulmine.Domain;
4   import fulmine.Type;
5   import fulmine.model.component.AbstractComponent;
6   import fulmine.protocol.wire.IWireIdentity;
7   import fulmine.protocol.wire.operation.IOperationScope;
8   
9   /**
10   * A marker event that forces a complete image update from a container. This
11   * update will be received by all listeners of the container and is needed for
12   * new listeners that are subscribed to the container to receive an initial
13   * image of the container.
14   * 
15   * @author Ramon Servadei
16   */
17  public final class ImageEvent extends AbstractComponent
18  {
19  
20      /** Construct the marker event to push out a change from a container */
21      public ImageEvent()
22      {
23          super("ImageEvent", Type.SYSTEM, Domain.FRAMEWORK);
24      }
25  
26      @Override
27      protected boolean doReadState(IOperationScope scope, byte[] buffer,
28          int start, int numberOfBytes) throws Exception
29      {
30          return true;
31      }
32  
33      @Override
34      protected boolean doWriteState(IOperationScope scope, IWireIdentity wireId,
35          byte[][] headerBuffer, int[] headerBufferPosition, byte[][] dataBuffer,
36          int[] dataBufferPosition, boolean completeState) throws Exception
37      {
38          return true;
39      }
40  }