Package org.restlet

Examples of org.restlet.Component


  void startServer() {
    LOG.info("zkDataTransferServer starting on Port " + _localWebservicePort + " zkAddress "
        + _zkAddress);

    _component = new Component();

    _component.getServers().add(Protocol.HTTP, _localWebservicePort);
    Context applicationContext = _component.getContext().createChildContext();
    applicationContext.getAttributes().put(SERVER, this);
    applicationContext.getAttributes().put(PORT, "" + _localWebservicePort);
View Full Code Here


    private Integer threadMaxIdleTimeMs;
    private Boolean useForwardedForHeader;
    private Boolean reuseAddress;

    public RestletComponent() {
        this(new Component());
    }
View Full Code Here

    private final Map<String, Server> servers = new HashMap<String, Server>();
    private final Map<String, MethodBasedRouter> routers = new HashMap<String, MethodBasedRouter>();
    private final Component component;

    public RestletComponent() {
        this.component = new Component();
    }
View Full Code Here

    private Boolean pipeliningConnections;
    private Integer threadMaxIdleTimeMs;
    private Boolean useForwardedForHeader;

    public RestletComponent() {
        this.component = new Component();
    }
View Full Code Here

    private Boolean reuseAddress;
    private boolean disableStreamCache;
    private int port;

    public RestletComponent() {
        this(new Component());
    }
View Full Code Here

    private final Map<String, Server> servers = new HashMap<String, Server>();
    private final Map<String, MethodBasedRouter> routers = new HashMap<String, MethodBasedRouter>();
    private final Component component;

    public RestletComponent() {
        this.component = new Component();
    }
View Full Code Here

            System.out.println("Piperack, a web server for running XProc pipelines.");
            XProcConfiguration.showVersion(runtime);
        }

        // Create a component
        Component component = new Component();
        component.getServers().add(Protocol.HTTP, config.piperackPort);

        // Create an application
        PiperackApplication application = new PiperackApplication(config, runtime);

        // Attach the application to the component and start it
        component.getDefaultHost().attach(application);
        component.start();

        while (true) {
            try {
                Thread.sleep(10000);
            } catch (InterruptedException e) {
View Full Code Here

    private final Map<String, Server> servers = new HashMap<String, Server>();
    private final Map<String, MethodBasedRouter> routers = new HashMap<String, MethodBasedRouter>();
    private final Component component;

    public RestletComponent() {
        this.component = new Component();
    }
View Full Code Here

                                            fmlContext.getServiceImpl(s));
            }
           
            // Start listening for REST requests
            try {
                final Component component = new Component();
                if (restHost == null) {
                  component.getServers().add(Protocol.HTTP, restPort);
                } else {
                  component.getServers().add(Protocol.HTTP, restHost, restPort);
                }
                component.getClients().add(Protocol.CLAP);
                component.getDefaultHost().attach(this);
                component.start();
            } catch (Exception e) {
                throw new RuntimeException(e);
            }
        }
View Full Code Here

    @Override
    public void startServer()
        throws Exception
    {
        component = new Component();
        component.getServers().add( Protocol.HTTP, 8182 );
        RestApplication application = module.newObject( RestApplication.class, component.getContext() );
        component.getDefaultHost().attach( application );
        component.start();
    }
View Full Code Here

TOP

Related Classes of org.restlet.Component

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.