Tabnine Logo
com.ociweb.pronghorn.network
Code IndexAdd Tabnine to your IDE (free)

How to use com.ociweb.pronghorn.network

Best Java code snippets using com.ociweb.pronghorn.network (Showing top 20 results out of 315)

origin: oci-pronghorn/Pronghorn

  public ClientConnection newClientConnection(ClientCoordinator ccm, int port,
      int sessionId, long connectionId, int requestPipeIdx, int responsePipeIdx, int hostId, long timeoutNS, int structureId)
      throws IOException {
    
    SSLEngine engine =  ccm.isTLS ?
        ccm.engineFactory.createSSLEngine(ClientCoordinator.registeredDomain(hostId), port)
        :null;
          return new ClientConnection(engine, hostId, port, sessionId, requestPipeIdx, responsePipeIdx, 
                   connectionId, timeoutNS, structureId);

  }
}
origin: oci-pronghorn/Pronghorn

@Override
public ServerCoordinator buildServerCoordinator() {
  finalizeDeclareConnections();
  
  return new ServerCoordinator(
      getCertificates(),
      bindHost(), 
      bindPort(),
      connectionStruct(),
      requireClientAuth(),
      serviceName(),
      defaultHostPath(), 
      buildServerConfig());
}

origin: oci-pronghorn/Pronghorn

public static void buildOrderingSupers(GraphManager graphManager, ServerCoordinator coordinator,
    Pipe<ServerResponseSchema>[][] fromModule, Pipe<HTTPLogResponseSchema>[] log,
    Pipe<NetPayloadSchema>[][] perTrackFromSuper) {
  
  int track = fromModule.length;
  while (--track>=0) {
  
    OrderSupervisorStage wrapSuper = new OrderSupervisorStage(graphManager, 
                          fromModule[track], 
                          log[track],
                          perTrackFromSuper[track], 
                          coordinator);//ensure order   

    coordinator.processNota(graphManager, wrapSuper);
  
  }
}
origin: oci-pronghorn/Pronghorn

  private ServerCoordinator coordinator(GraphManager gm) {
    
    HTTPServerConfig serverConfig = NetGraphBuilder.serverConfig(9999, gm);
    serverConfig.setHost("127.0.0.1");
    serverConfig.setConcurrentChannelsPerDecryptUnit(4);
    serverConfig.setConcurrentChannelsPerEncryptUnit(4);
    
    ((HTTPServerConfigImpl)serverConfig).finalizeDeclareConnections();
        
    return serverConfig.buildServerCoordinator();

  }
}
origin: oci-pronghorn/Pronghorn

SSLEngine createSSLEngine() {
  return getService().createSSLEngineServer();
}
origin: oci-pronghorn/Pronghorn

private boolean processSelection(SelectionKey selection) {
  
  assert isRead(selection) : "only expected read"; 
  final SocketChannel socketChannel = (SocketChannel)selection.channel();
  
  //get the context object so we know what the channel identifier is
  ConnectionContext connectionContext = (ConnectionContext)selection.attachment();                
  long channelId = connectionContext.getChannelId();
  assert(channelId>=0);
  //logger.info("\nnew key selection in reader for connection {}",channelId);
  
  return processConnection(selection, socketChannel, channelId, coordinator.lookupConnectionById(channelId));
}

origin: oci-pronghorn/Pronghorn

  @Override
  public void buildServer(GraphManager gm, ServerCoordinator coordinator,
      Pipe<ReleaseSchema>[] releaseAfterParse, Pipe<NetPayloadSchema>[] receivedFromNet,
      Pipe<NetPayloadSchema>[] sendingToNet) {
    NetGraphBuilder.buildHTTPStages(gm, coordinator, modules, 
            releaseAfterParse, receivedFromNet, sendingToNet);
  }            
};
origin: oci-pronghorn/Pronghorn

@Override
public HTTPServerConfig logTraffic() {
  logFile = new LogFileConfig(LogFileConfig.defaultPath(),
                LogFileConfig.DEFAULT_COUNT, 
                LogFileConfig.DEFAULT_SIZE,
                false);
  //logging the full response often picks up binary and large data
  //this should only be turned on with an explicit true
  return this;
}

origin: oci-pronghorn/Pronghorn

public SSLEngine createSSLEngine(String host, int port) {
  return getService().createSSLEngineClient(host, port);
}
origin: oci-pronghorn/Pronghorn

private boolean writeAll(boolean didWork, int i, Pipe<NetPayloadSchema> pipe, int msgIdx) {
  
  //For the close test we must be sending a plain then a disconnect NOT two plains!!
  //Any sequential Plain or Encrypted values will be rolled together at times on the same connection.
  
  if (NetPayloadSchema.MSG_PLAIN_210 == msgIdx) {							
    didWork = writePlain(didWork, i, pipe);
  } else {
    didWork = writeAllLessCommon(didWork, i, pipe, msgIdx);
  }
  return didWork;
}
origin: oci-pronghorn/Pronghorn

@Override
public HTTPServerConfig useInsecureServer() {
  configStage.throwIfNot(BridgeConfigStage.DeclareConnections);
  this.serverTLS = null;
  return this;
}
origin: oci-pronghorn/GreenLightning

public void shutdown() {
  if (null!=ccm) {
    ccm.shutdown();
  }
  
  
  //can be overridden by specific hardware impl if shutdown is supported.
}
origin: oci-pronghorn/Pronghorn

public static OrderSupervisorStage newInstance(GraphManager graphManager, 
    Pipe<ServerResponseSchema>[] inputPipes, 
    Pipe<HTTPLogResponseSchema> log,
    //Pipe<AlertNoticeSchema> alerts, //can be null...new pipe schema for alerts
    Pipe<NetPayloadSchema>[] outgoingPipes, 
    ServerCoordinator coordinator, boolean isTLS) {
  return new OrderSupervisorStage(graphManager, inputPipes, log, outgoingPipes, coordinator);
}
origin: oci-pronghorn/Pronghorn

public static DummyRestStage newInstance(GraphManager graphManager,
    Pipe<HTTPRequestSchema>[] inputPipes,
    Pipe<ServerResponseSchema>[] outputs,
    HTTPSpecification<?,?,?,?> httpSpec) {
  return new DummyRestStage(graphManager, inputPipes, outputs, httpSpec);
}
origin: oci-pronghorn/Pronghorn

  @Override
  public void buildServer(GraphManager gm, 
              ServerCoordinator coordinator,
              Pipe<ReleaseSchema>[] releaseAfterParse, 
              Pipe<NetPayloadSchema>[] receivedFromNet,
              Pipe<NetPayloadSchema>[] sendingToNet) {
            
    NetGraphBuilder.buildHTTPStages(gm, coordinator, buildModules(output), 
                    releaseAfterParse, receivedFromNet, sendingToNet);
  }
});
origin: oci-pronghorn/Pronghorn

@Override
public HTTPServerConfig logTraffic(boolean logResponse) {
  logFile = new LogFileConfig(LogFileConfig.defaultPath(),
                LogFileConfig.DEFAULT_COUNT, 
                LogFileConfig.DEFAULT_SIZE,
                logResponse);
  return this;
}

origin: oci-pronghorn/Pronghorn

@Override
public HTTPServerConfig setEncryptionUnitsPerTrack(int value) {
  configStage.throwIfNot(BridgeConfigStage.DeclareConnections);
  this.encryptionUnitsPerTrack = value;
  return this;
}
origin: oci-pronghorn/Pronghorn

@Override
public HTTPServerConfig setTLS(TLSCertificates certificates) {
  configStage.throwIfNot(BridgeConfigStage.DeclareConnections);
  assert(null != certificates);
  this.serverTLS = certificates;
  return this;
}
origin: oci-pronghorn/Pronghorn

@Override
public HTTPServerConfig setConcurrentChannelsPerEncryptUnit(int value) {
  configStage.throwIfNot(BridgeConfigStage.DeclareConnections);
  this.concurrentChannelsPerEncryptUnit = value;
  return this;
}
origin: oci-pronghorn/Pronghorn

@Override
public HTTPServerConfig setConcurrentChannelsPerDecryptUnit(int value) {
  configStage.throwIfNot(BridgeConfigStage.DeclareConnections);
  this.concurrentChannelsPerDecryptUnit = value;
  return this;
}
com.ociweb.pronghorn.network

Most used classes

  • HTTPServerConfig
  • CompositeRoute
  • NetGraphBuilder
  • ClientCoordinator
  • HTTPContentTypeDefaults
  • HeaderWriter,
  • ServerResponseSchema,
  • ClientConnection,
  • HTTPServerConfigImpl,
  • HTTPUtilResponse,
  • ServerCoordinator,
  • ServerNewConnectionStage,
  • TLSCerts,
  • TLSService,
  • HTTPHeaderDefaults,
  • HTTPRevisionDefaults,
  • HTTPSpecification,
  • ResourceModuleStage,
  • ClientAbandonConnectionScanner
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