org.modeshape.sequencer.java
Class JavaMetadataSequencer

java.lang.Object
  extended by org.modeshape.sequencer.java.JavaMetadataSequencer
All Implemented Interfaces:
StreamSequencer

public class JavaMetadataSequencer
extends Object
implements StreamSequencer


Constructor Summary
JavaMetadataSequencer()
           
 
Method Summary
 void sequence(InputStream stream, SequencerOutput output, StreamSequencerContext context)
          Sequence the data found in the supplied stream, placing the output information into the supplied map.
 void setSourceFileRecorder(SourceFileRecorder sourceFileRecorder)
          Sets a custom SourceFileRecorder.
 void setSourceFileRecorderClassName(String sourceFileRecorderClassName)
          Sets the custom SourceFileRecorder by specifying a class name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaMetadataSequencer

public JavaMetadataSequencer()
Method Detail

sequence

public void sequence(InputStream stream,
                     SequencerOutput output,
                     StreamSequencerContext context)
Sequence the data found in the supplied stream, placing the output information into the supplied map.

ModeShape's SequencingService determines the sequencers that should be executed by monitoring the changes to one or more workspaces that it is monitoring. Changes in those workspaces are aggregated and used to determine which sequencers should be called. If the sequencer implements this interface, then this method is called with the property that is to be sequenced along with the interface used to register the output. The framework takes care of all the rest.

Specified by:
sequence in interface StreamSequencer
Parameters:
stream - the stream with the data to be sequenced; never null
output - the output from the sequencing operation; never null
context - the context for the sequencing operation; never null
See Also:
StreamSequencer.sequence(java.io.InputStream, org.modeshape.graph.sequencer.SequencerOutput, org.modeshape.graph.sequencer.StreamSequencerContext)

setSourceFileRecorderClassName

public void setSourceFileRecorderClassName(String sourceFileRecorderClassName)
                                    throws ClassNotFoundException,
                                           IllegalAccessException,
                                           InstantiationException
Sets the custom SourceFileRecorder by specifying a class name. This method attempts to instantiate an instance of the custom SourceFileRecorder class prior to ensure that the new value represents a valid implementation.

Parameters:
sourceFileRecorderClassName - the fully-qualified class name of the new custom class file recorder implementation; null indicates that the class file recorder should be used.
Throws:
ClassNotFoundException - if the the class for the SourceFileRecorder implementation cannot be located
IllegalAccessException - if the row factory class or its nullary constructor is not accessible.
InstantiationException - if the row factory represents an abstract class, an interface, an array class, a primitive type, or void; or if the class has no nullary constructor; or if the instantiation fails for some other reason.
ClassCastException - if the instantiated class file recorder does not implement the SourceFileRecorder interface

setSourceFileRecorder

public void setSourceFileRecorder(SourceFileRecorder sourceFileRecorder)
Sets a custom SourceFileRecorder. If sourceFileRecorder is null, then the class file recorder will be used.

Parameters:
sourceFileRecorder - the new custom class file recorder implementation; null indicates that the class file recorder should be used.


Copyright © 2008-2010 JBoss, a division of Red Hat. All Rights Reserved.