Package org.restlet.data

Examples of org.restlet.data.ServerInfo


     *
     * @return The server-specific information.
     */
    @Override
    public ServerInfo getServerInfo() {
        final ServerInfo result = super.getServerInfo();

        if (!this.serverAdded) {
            result.setAddress(this.httpCall.getServerAddress());
            result.setAgent(Engine.VERSION_HEADER);
            result.setPort(this.httpCall.getServerPort());
            this.serverAdded = true;
        }

        return result;
    }
View Full Code Here


     *
     * @return The server-specific information.
     */
    public ServerInfo getServerInfo() {
        // Lazy initialization with double-check.
        ServerInfo s = this.serverInfo;
        if (s == null) {
            synchronized (this) {
                s = this.serverInfo;
                if (s == null) {
                    this.serverInfo = s = new ServerInfo();
                }
            }
        }
        return s;
    }
View Full Code Here

    protected XdmNode xsl() {
        return ((PiperackApplication) getApplication()).xsl();
    }

    protected String pipelineUri(String id) {
        ServerInfo serverInfo = getServerInfo();
        String hostname = "localhost";
        if (serverInfo.getAddress() != null) {
            // I bet this is a number not a name :-(
            hostname = serverInfo.getAddress();
        }

        return "http://" + hostname + ":" + serverInfo.getPort() + "/pipelines/" + id;
    }
View Full Code Here

     * Returns the server-specific information.
     *
     * @return The server-specific information.
     */
    public ServerInfo getServerInfo() {
        ServerInfo result = super.getServerInfo();

        if (!this.serverAdded) {
            result.setAddress(httpCall.getServerAddress());
            result.setAgent(Engine.VERSION_HEADER);
            result.setPort(httpCall.getServerPort());
            this.serverAdded = true;
        }

        return result;
    }
View Full Code Here

     *
     * @return The server-specific information.
     */
  @Override
    public ServerInfo getServerInfo() {
        ServerInfo result = super.getServerInfo();

        if (!this.serverAdded) {
            result.setAddress(httpCall.getServerAddress());
            result.setAgent(Engine.VERSION_HEADER);
            result.setPort(httpCall.getServerPort());
            this.serverAdded = true;
        }

        return result;
    }
View Full Code Here

     *
     * @return The server-specific information.
     */
    @Override
    public ServerInfo getServerInfo() {
        final ServerInfo result = super.getServerInfo();

        if (!this.serverAdded) {
            result.setAddress(this.httpCall.getServerAddress());
            result.setAgent(Engine.VERSION_HEADER);
            result.setPort(this.httpCall.getServerPort());
            this.serverAdded = true;
        }

        return result;
    }
View Full Code Here

TOP

Related Classes of org.restlet.data.ServerInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.