Tabnine Logo
FileReadModuleStage.newInstance
Code IndexAdd Tabnine to your IDE (free)

How to use
newInstance
method
in
com.ociweb.pronghorn.network.module.FileReadModuleStage

Best Java code snippets using com.ociweb.pronghorn.network.module.FileReadModuleStage.newInstance (Showing top 3 results out of 315)

origin: oci-pronghorn/Pronghorn

@Override
public Pipe<ServerResponseSchema>[] registerModule(int a,
    GraphManager graphManager, RouterStageConfig routerConfig, 
    Pipe<HTTPRequestSchema>[] inputPipes) {
  
    //the file server is stateless therefore we can build 1 instance for every input pipe
    int instances = inputPipes.length;
    
    Pipe<ServerResponseSchema>[] staticFileOutputs = new Pipe[instances];
    
    int i = instances;
    while (--i>=0) {
      staticFileOutputs[i] = new Pipe<ServerResponseSchema>(fileServerOutgoingDataConfig);
      FileReadModuleStage.newInstance(graphManager, inputPipes[i], staticFileOutputs[i], (HTTPSpecification<HTTPContentTypeDefaults, HTTPRevisionDefaults, HTTPVerbDefaults, HTTPHeaderDefaults>) ((HTTPRouterStageConfig)routerConfig).httpSpec, new File(pathRoot));					
    }
      
    routerConfig.registerCompositeRoute().path("/${path}");
    //no headers requested
    
  return staticFileOutputs;
}        
 
origin: oci-pronghorn/GreenLightning

public RouteFilter addFileServer(String path) { //adds server to all routes
  final int parallelIndex = (-1 == parallelInstanceUnderActiveConstruction) ? 0 : parallelInstanceUnderActiveConstruction;
          
  //due to internal implementation we must keep the same number of outputs as inputs.
  Pipe<HTTPRequestSchema>[] inputs = new Pipe[1];
  Pipe<ServerResponseSchema>[] outputs = new Pipe[1];		
  populateHTTPInOut(inputs, outputs, 0, parallelIndex);
    
  FileReadModuleStage.newInstance(gm, inputs, outputs, builder.httpSpec, buildFilePath(path));
      
  return new StageRouteFilter(inputs[0], builder, parallelIndex);
}
origin: oci-pronghorn/Pronghorn

if (null != pathRoot) {
  FileReadModuleStage.newInstance(graphManager, inputPipes[i], staticFileOutputs[i], (HTTPSpecification<HTTPContentTypeDefaults, HTTPRevisionDefaults, HTTPVerbDefaults, HTTPHeaderDefaults>) ((HTTPRouterStageConfig)routerConfig).httpSpec, pathRoot);	
} else {
com.ociweb.pronghorn.network.moduleFileReadModuleStagenewInstance

Popular methods of FileReadModuleStage

  • <init>
  • beginReadingNextRequest
  • beginSendingFile
  • checkForHotReplace
  • collectAllKnownFiles
  • countAllKnownFiles
  • debugFileProgress
  • disconnectDueToError
  • findAgainFileChannel
  • otherVerbs
  • positionOfFileDataBegin
  • publishBodiesMessage
  • positionOfFileDataBegin,
  • publishBodiesMessage,
  • publishBodyPart,
  • publishErrorHeader,
  • publishNoBodyMessage,
  • recordIncomingState,
  • recordOutgoingState,
  • reportRecordedStates,
  • requestShutdown

Popular in Java

  • Creating JSON documents from java classes using gson
  • getResourceAsStream (ClassLoader)
  • getContentResolver (Context)
  • setRequestProperty (URLConnection)
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now