Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 688B9200D10 for ; Sun, 24 Sep 2017 22:09:02 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 66E4E1609E8; Sun, 24 Sep 2017 20:09:02 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 101EC1609A7 for ; Sun, 24 Sep 2017 22:08:59 +0200 (CEST) Received: (qmail 90484 invoked by uid 500); 24 Sep 2017 20:08:59 -0000 Mailing-List: contact commits-help@juneau.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@juneau.incubator.apache.org Delivered-To: mailing list commits@juneau.incubator.apache.org Received: (qmail 90474 invoked by uid 99); 24 Sep 2017 20:08:59 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Sep 2017 20:08:59 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 6AAC3DA683 for ; Sun, 24 Sep 2017 20:08:58 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.222 X-Spam-Level: X-Spam-Status: No, score=-4.222 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id aca2QSMCXJ21 for ; Sun, 24 Sep 2017 20:08:51 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with SMTP id 8151E61036 for ; Sun, 24 Sep 2017 20:08:44 +0000 (UTC) Received: (qmail 90176 invoked by uid 99); 24 Sep 2017 20:08:43 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Sep 2017 20:08:43 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 1EE7DF5A98; Sun, 24 Sep 2017 20:08:41 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jamesbognar@apache.org To: commits@juneau.incubator.apache.org Date: Sun, 24 Sep 2017 20:08:59 -0000 Message-Id: In-Reply-To: <210d2aa9372a45209956c33f9981428f@git.apache.org> References: <210d2aa9372a45209956c33f9981428f@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [19/22] incubator-juneau-website git commit: Update javadocs. archived-at: Sun, 24 Sep 2017 20:09:02 -0000 http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/eb2492a5/content/site/apidocs/org/apache/juneau/microservice/RestMicroservice.html ---------------------------------------------------------------------- diff --git a/content/site/apidocs/org/apache/juneau/microservice/RestMicroservice.html b/content/site/apidocs/org/apache/juneau/microservice/RestMicroservice.html index 4962cb2..27c4420 100644 --- a/content/site/apidocs/org/apache/juneau/microservice/RestMicroservice.html +++ b/content/site/apidocs/org/apache/juneau/microservice/RestMicroservice.html @@ -18,7 +18,7 @@ catch(err) { } //--> -var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":9,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10}; +var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":9,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":9,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10}; var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; @@ -113,7 +113,7 @@ var activeTableTab = "activeTableTab";


  • -
    public class RestMicroservice
    +
    public class RestMicroservice
     extends Microservice
    Entry point for Juneau microservice that implements a REST interface using Jetty on a single port. @@ -124,12 +124,11 @@ extends Defining REST Resources - Top-level REST resources are defined by the getResourceMap() method. - This method can be overridden to provide a customized list of REST resources. + Top-level REST resources are defined in the jetty.xml file as normal servlets.
    Logging
    - Logging is initialized by the initLogging() method. + Logging is initialized by the Microservice.initLogging() method. This method can be overridden to provide customized logging behavior.
    Lifecycle Listener Methods
    @@ -208,115 +207,127 @@ extends +String +getContextPath() +
    Returns the context path that this microservice is using.
    + + + +String +getHostName() +
    Returns the hostname of this microservice.
    + + + +static RestMicroservice +getInstance() +
    Returns the Microservice instance.
    + + + int getPort()
    Returns the port that this microservice started up on.
    - -protected Map<String,Class<? extends Servlet>> -getResourceMap() -
    Returns the resource map to use for this microservice.
    + +String +getProtocol() +
    Returns whether this microservice is using "http" or "https".
    - + org.eclipse.jetty.server.Server getServer()
    Returns the underlying Jetty server.
    - + URI getURI()
    Returns the URI where this microservice is listening on.
    - -protected void -initLogging() -
    Initialize the logging for this microservice.
    - - - + RestMicroservice join()
    Joins the application with the current thread.
    - + static void main(String[] args)
    Main method.
    - + protected void onConfigSave(ConfigFile cf)
    Called when ConfigFile.save() is called on the config file.
    - + protected void onCreateServer()
    Called before createServer() is called.
    - + protected void onPostStartServer()
    Called after the Jetty server is started.
    - + protected void onPostStopServer()
    Called after the Jetty server is stopped.
    - + protected void onStartServer()
    Called before startServer() is called.
    - + protected void onStopServer()
    Called before the Jetty server is stopped.
    - + RestMicroservice setConfig(String cfPath, boolean create)
    Specifies the path of the config file for this microservice.
    - + RestMicroservice setJettyXml(Object jettyXml)
    Sets the jetty.xml used to configure the Jetty server.
    - + RestMicroservice setManifestContents(String... contents)
    Convenience method for specifying the manifest contents directly.
    - + RestMicroservice start()
    Start this application.
    - + protected int startServer()
    Method used to start the Jetty server created by createServer().
    - + RestMicroservice stop()
    Stop this application.
    @@ -328,7 +339,7 @@ extends

    Methods inherited from class org.apache.juneau.microservice.Microservice

    -createVarResolver, getArgs, getConfig, getManifest, kill, onConfigChange, onStart, onStop, setConfig, setManifest, setManifest, setManifest
  • +createVarResolver, getArgs, getConfig, getLogger, getManifest, getVarResolver, initLogging, kill, onConfigChange, onStart, onStop, setConfig, setManifest, setManifest, setManifest - - - -
      -
    • -

      getResourceMap

      -
      protected Map<String,Class<? extends Servlet>> getResourceMap()
      -                                                       throws ClassNotFoundException,
      -                                                              ParseException
      -
      Returns the resource map to use for this microservice. - -

      - Subclasses can override this method to programmatically specify their resources. - -

      - The default implementation is configured by the following values in the config file: -

      - - #================================================================================ - # REST settings - #================================================================================ - [REST] - - # A JSON map of servlet paths to servlet classes. - # Example: - # resourceMap = {'/*':'com.foo.MyServlet'} - # Either resourceMap or resources must be specified if it's not defined in - # the manifest file. - resourceMap = - - # A comma-delimited list of names of classes that extend from Servlet. - # Resource paths are pulled from @RestResource.path() annotation, or - # "/*" if annotation not specified. - # Example: - # resources = com.foo.MyServlet - * # Default is Rest-Resources in manifest file. - # Either resourceMap or resources must be specified if it's not defined in - # the manifest file. - resources = -

      - -

      - In most cases, the rest resources will be specified in the manifest file since it's not likely to be a - configurable property: -

      - Rest-Resources: org.apache.juneau.microservice.sample.RootResources -

      -
      -
      Returns:
      -
      The map of REST resources.
      -
      Throws:
      -
      ClassNotFoundException
      -
      ParseException
      -
      -
    • -