Class RestChild

java.lang.Object
org.apache.juneau.rest.RestChild

public class RestChild extends Object
Represents a simple child REST resource / path mapping.
Example:

// Parent resource. public class MyResource { public MyResource(RestContext.Builder builder) throws Exception { // Register a child resource. builder.children(new RestChild("/child", new MyChildResource()); // The above is equivalent to... builder.child("/child", new MyChildResource()); } }

See Also:
  • Constructor Details

    • RestChild

      public RestChild(String path, Object resource)
      Constructor.
      Parameters:
      path - The child resource path relative to the parent resource URI.
      resource - The child resource.
      Can either be a Class (which will be instantiated using the registered BeanStore) or an already-instantiated object.