Tabnine Logo
ExternalHandlerServer
Code IndexAdd Tabnine to your IDE (free)

How to use
ExternalHandlerServer
in
co.cask.coopr.http

Best Java code snippets using co.cask.coopr.http.ExternalHandlerServer (Showing top 10 results out of 315)

origin: caskdata/coopr

 public HttpResponse call() throws Exception {
  return doSecureGet(String.format("http://%s:%d/status", HOSTNAME,
                   externalHandlerServer.getBindAddress().getPort()));
 }
});
origin: caskdata/coopr

@Before
public void startServer() {
 externalHandlerServer = injector.getInstance(ExternalHandlerServer.class);
 externalHandlerServer.startAndWait();
}
origin: caskdata/coopr

 @Override
 void addSSLConfig(NettyHttpService.Builder builder, Configuration conf) {
  boolean enableSSL = conf.getBoolean(Constants.EXTERNAL_ENABLE_SSL);
  if (enableSSL) {
   builder.enableSSL(getSSLConfig(conf, Constants.EXTERNAL_SSL_KEYSTORE_PATH,
                   Constants.EXTERNAL_SSL_KEYSTORE_PASSWORD,
                   Constants.EXTERNAL_SSL_KEYPASSWORD,
                   Constants.EXTERNAL_SSL_TRUST_KEYSTORE_PATH,
                   Constants.EXTERNAL_SSL_TRUST_KEYPASSWORD));
  }
 }
}
origin: caskdata/coopr

@BeforeClass
public static void setup() throws IOException, InterruptedException {
 initAuthTestProps();
 externalHandlerServer = injector.getInstance(ExternalHandlerServer.class);
 externalHandlerServer.startAndWait();
 externalAuthenticationServer = injector.getInstance(ExternalAuthenticationServer.class);
 externalAuthenticationServer.startAndWait();
 // Wait *SLEEP_TIME_IN_SEC* for the complete service start
 Thread.sleep(1000 * SLEEP_TIME_IN_SEC);
 testServerPort = externalHandlerServer.getBindAddress().getPort();
 authURL = String.format("http://%s:%d/token",
             externalAuthenticationServer.getSocketAddress().getHostName(),
             externalAuthenticationServer.getSocketAddress().getPort());
}
origin: caskdata/coopr

@After
public void stopServer() {
 externalHandlerServer.stopAndWait();
}
origin: caskdata/coopr

LOG.info("Internal API handler service started on {}", internalHandlerServer.getBindAddress());
externalHandlerServer = injector.getInstance(ExternalHandlerServer.class);
externalHandlerServer.startAndWait();
LOG.info("External API handler service started on {}", externalHandlerServer.getBindAddress());
origin: caskdata/coopr

@AfterClass
public static void cleanupServiceBase() {
 internalHandlerServer.stopAndWait();
 externalHandlerServer.stopAndWait();
}
origin: caskdata/coopr

@BeforeClass
public static void setupServiceBase() throws Exception {
 balancerQueue = injector.getInstance(Key.get(TrackingQueue.class, Names.named(Constants.Queue.WORKER_BALANCE)));
 provisionerQueues = queueService.getQueueGroup(QueueType.PROVISIONER);
 clusterQueues = queueService.getQueueGroup(QueueType.CLUSTER);
 solverQueues = queueService.getQueueGroup(QueueType.SOLVER);
 jobQueues = queueService.getQueueGroup(QueueType.JOB);
 callbackQueues = queueService.getQueueGroup(QueueType.CALLBACK);
 internalHandlerServer = injector.getInstance(InternalHandlerServer.class);
 internalHandlerServer.startAndWait();
 internalPort = internalHandlerServer.getBindAddress().getPort();
 externalHandlerServer = injector.getInstance(ExternalHandlerServer.class);
 externalHandlerServer.startAndWait();
 externalPort = externalHandlerServer.getBindAddress().getPort();
 tenantProvisionerService = injector.getInstance(TenantProvisionerService.class);
 internalBase = "http://" + HOSTNAME + ":" + internalPort + Constants.API_BASE;
 externalBase = "http://" + HOSTNAME + ":" + externalPort + Constants.API_BASE;
}
origin: caskdata/coopr

@Test
public void testStatus() throws Exception {
 HttpResponse response = doSecureGet(String.format("https://%s:%d/status", HOSTNAME,
                       externalHandlerServer.getBindAddress().getPort()));
 Assert.assertEquals(200, response.getStatusLine().getStatusCode());
 Assert.assertEquals("OK\n", EntityUtils.toString(response.getEntity()));
}
origin: caskdata/coopr

@AfterClass
public static void shutDown() {
 externalHandlerServer.stopAndWait();
 externalAuthenticationServer.stopAndWait();
}
co.cask.coopr.httpExternalHandlerServer

Javadoc

Netty service for running the server that manages external API.

Most used methods

  • getBindAddress
  • startAndWait
  • getSSLConfig
  • stopAndWait

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSystemService (Context)
  • scheduleAtFixedRate (Timer)
  • runOnUiThread (Activity)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • BoxLayout (javax.swing)
  • JTextField (javax.swing)
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Top plugins for Android Studio
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