code: private static void initStreams() {
  		Log.info("Initializing Streams...");
  		MetadataCommand command = (MetadataCommand) PreConfigurationContext.getCommandByName("-metadata");
  		BatchCommand batchCommand = (BatchCommand) PreConfigurationContext.getCommandByName("-batchSize");
  		
  		AsyncAnnotationAuditOutputStream asyncAnnotationStream = new AsyncAnnotationAuditOutputStream(
                  new AuditProcessOutputStream(Context.getConfigContext()), annotationTransformer);
  		
          AuditProcessOutputStream processStream =  new AuditProcessOutputStream(Context.getConfigContext());
          
          
  		if (command.isAsync()) {
  		    MetadataLookupStream metadataStream;
  		    if(batchCommand.getBatchSize() > 0) {
  	            BatchProcessStream batchStream = new BatchProcessStream(processStream, batchCommand.getBatchSize());
  	            metadataStream = new MetadataLookupStream(batchStream);
  		    } else {
  		        metadataStream = new MetadataLookupStream(processStream);
  		    }
  			
  			AsyncAuditOutputStream asyncStream = new AsyncAuditOutputStream(metadataStream, asyncAnnotationStream);
  			auditStream = new AuditEventOutputStream(asyncStream, configContext);
  		} else {
  		    AsyncAuditOutputStream asyncStream;
  		    if(batchCommand.getBatchSize() > 0) {
                  BatchProcessStream batchStream = new BatchProcessStream(processStream, batchCommand.getBatchSize());
                  asyncStream = new AsyncAuditOutputStream(batchStream, asyncAnnotationStream);
              } else {
                  asyncStream = new AsyncAuditOutputStream(processStream, asyncAnnotationStream);
              }
  			MetadataLookupStream metadataStream = new MetadataLookupStream(asyncStream);
  			auditStream = new AuditEventOutputStream(metadataStream, configContext);
  		}
  
  		Log.info("Audit Streams Initialized.");
  	}
docs: Initialize streams.