Codota Logo
ExternalHandlerServer
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Charset c =
  • Codota IconString charsetName;Charset.forName(charsetName)
  • Codota IconCharset.defaultCharset()
  • Codota IconContentType contentType;contentType.getCharset()
  • Smart code suggestions by Codota
}
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

  • Reading from database using SQL prepared statement
  • setContentView (Activity)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Timer (java.util)
    A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now