コード例 #1
0
  /**
   * Sets the next handler such as a Restlet or a Filter.
   *
   * <p>In addition, this method will set the context of the next Restlet if it is null by passing a
   * reference to its own context.
   *
   * @param next The next handler.
   */
  public void setNext(org.restlet.Uniform next) {
    if (next instanceof Restlet) {
      Restlet nextRestlet = (Restlet) next;

      if (nextRestlet.getContext() == null) {
        nextRestlet.setContext(getContext());
      }
    }

    this.next = next;

    // If true, it must be updated after calling this method
    this.nextCreated = false;
  }
コード例 #2
0
 /** Constructor with a parent Restlet. */
 public SpringBeanRouter(Restlet parent) {
   super(parent.getContext());
 }