boot-truffle/src/main/java/net/java/html/boot/truffle/TrufflePresenters.java
author Jaroslav Tulach <jtulach@netbeans.org>
Thu, 21 Jul 2016 11:21:58 +0200
changeset 1105 907bcc5dbb00
permissions -rw-r--r--
Documenting the Truffle based presenter
jtulach@1105
     1
/**
jtulach@1105
     2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
jtulach@1105
     3
 *
jtulach@1105
     4
 * Copyright 2013-2014 Oracle and/or its affiliates. All rights reserved.
jtulach@1105
     5
 *
jtulach@1105
     6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
jtulach@1105
     7
 * Other names may be trademarks of their respective owners.
jtulach@1105
     8
 *
jtulach@1105
     9
 * The contents of this file are subject to the terms of either the GNU
jtulach@1105
    10
 * General Public License Version 2 only ("GPL") or the Common
jtulach@1105
    11
 * Development and Distribution License("CDDL") (collectively, the
jtulach@1105
    12
 * "License"). You may not use this file except in compliance with the
jtulach@1105
    13
 * License. You can obtain a copy of the License at
jtulach@1105
    14
 * http://www.netbeans.org/cddl-gplv2.html
jtulach@1105
    15
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
jtulach@1105
    16
 * specific language governing permissions and limitations under the
jtulach@1105
    17
 * License.  When distributing the software, include this License Header
jtulach@1105
    18
 * Notice in each file and include the License file at
jtulach@1105
    19
 * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
jtulach@1105
    20
 * particular file as subject to the "Classpath" exception as provided
jtulach@1105
    21
 * by Oracle in the GPL Version 2 section of the License file that
jtulach@1105
    22
 * accompanied this code. If applicable, add the following below the
jtulach@1105
    23
 * License Header, with the fields enclosed by brackets [] replaced by
jtulach@1105
    24
 * your own identifying information:
jtulach@1105
    25
 * "Portions Copyrighted [year] [name of copyright owner]"
jtulach@1105
    26
 *
jtulach@1105
    27
 * Contributor(s):
jtulach@1105
    28
 *
jtulach@1105
    29
 * The Original Software is NetBeans. The Initial Developer of the Original
jtulach@1105
    30
 * Software is Oracle. Portions Copyright 2013-2014 Oracle. All Rights Reserved.
jtulach@1105
    31
 *
jtulach@1105
    32
 * If you wish your version of this file to be governed by only the CDDL
jtulach@1105
    33
 * or only the GPL Version 2, indicate your decision by adding
jtulach@1105
    34
 * "[Contributor] elects to include this software in this distribution
jtulach@1105
    35
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
jtulach@1105
    36
 * single choice of license, a recipient has the option to distribute
jtulach@1105
    37
 * your version of this file under either the CDDL, the GPL Version 2 or
jtulach@1105
    38
 * to extend the choice of license to its licensees as provided above.
jtulach@1105
    39
 * However, if you add GPL Version 2 code and therefore, elected the GPL
jtulach@1105
    40
 * Version 2 license, then the option applies only if the new code is
jtulach@1105
    41
 * made subject to such option by the copyright holder.
jtulach@1105
    42
 */
jtulach@1105
    43
package net.java.html.boot.truffle;
jtulach@1105
    44
jtulach@1105
    45
import java.util.concurrent.Executor;
jtulach@1105
    46
import org.netbeans.html.boot.spi.Fn;
jtulach@1105
    47
jtulach@1105
    48
jtulach@1105
    49
/** Integration with Truffle and
jtulach@1105
    50
 * <a href="http://www.oracle.com/technetwork/oracle-labs/program-languages/overview/">GraalVM</a>.
jtulach@1105
    51
 *
jtulach@1105
    52
 * @since 1.4
jtulach@1105
    53
 */
jtulach@1105
    54
public final class TrufflePresenters {
jtulach@1105
    55
    private TrufflePresenters() {
jtulach@1105
    56
    }
jtulach@1105
    57
jtulach@1105
    58
    /** Creates new instance of Truffle based presenter.
jtulach@1105
    59
     *
jtulach@1105
    60
     * @param executor the executor to run requests in
jtulach@1105
    61
     * @return new instance of the presenter
jtulach@1105
    62
     */
jtulach@1105
    63
    public static Fn.Presenter create(Executor executor) {
jtulach@1105
    64
        return new TrufflePresenter(executor, null);
jtulach@1105
    65
    }
jtulach@1105
    66
}