Examples of JerseyServer


Examples of com.englishtown.vertx.jersey.JerseyServer

    @Override
    public Promise<JerseyServer> createServer(JsonObject config) {
        final Deferred<JerseyServer> d = new When<JerseyServer>().defer();

        try {
            final JerseyServer jerseyServer = jerseyServerProvider.get();
            JerseyConfigurator configurator = configuratorProvider.get();

            configurator.init(config, vertx, container);

            jerseyServer.init(configurator, new Handler<AsyncResult<HttpServer>>() {
                @Override
                public void handle(AsyncResult<HttpServer> result) {
                    if (result.succeeded()) {
                        d.getResolver().resolve(jerseyServer);
                    } else {
View Full Code Here

Examples of com.englishtown.vertx.jersey.JerseyServer

    @Override
    public Promise<JerseyServer> createServer(JsonObject config) {
        final Deferred<JerseyServer> d = new When<JerseyServer>().defer();

        try {
            final JerseyServer jerseyServer = jerseyServerProvider.get();
            JerseyConfigurator configurator = configuratorProvider.get();

            configurator.init(config, vertx, container);

            jerseyServer.init(configurator, new Handler<AsyncResult<HttpServer>>() {
                @Override
                public void handle(AsyncResult<HttpServer> result) {
                    if (result.succeeded()) {
                        d.getResolver().resolve(jerseyServer);
                    } else {
View Full Code Here

Examples of com.englishtown.vertx.jersey.JerseyServer

                vertx,
                new ArrayList<>(),
                new ArrayList<>());

        JerseyHandler handler = new DefaultJerseyHandler(provider, new ArrayList<>());
        JerseyServer server = new DefaultJerseyServer(handler);
        JerseyOptions options = new DefaultJerseyOptions(null);
        When when = WhenFactory.createSync();

        DefaultWhenJerseyServer whenJerseyServer = new DefaultWhenJerseyServer(vertx, server, options, when);
View Full Code Here

Examples of com.englishtown.vertx.jersey.JerseyServer

    @Override
    public Promise<JerseyServer> createServer(JsonObject config) {
        final Deferred<JerseyServer> d = when.defer();

        try {
            final JerseyServer jerseyServer = jerseyServerProvider.get();
            JerseyConfigurator configurator = configuratorProvider.get();

            configurator.init(config, vertx, container);

            jerseyServer.init(configurator, result -> {
                if (result.succeeded()) {
                    d.resolve(jerseyServer);
                } else {
                    d.reject(result.cause());
                }
View Full Code Here

Examples of uk.org.ogsadai.client.toolkit.presentation.jersey.JerseyServer

     * @return The result as a Result
     */
    public static Result getResultFromURL(String name, String url)
    {
       
        JerseyServer server = new JerseyServer();
        try
        {
            DataSourceResource datasource =
                server.getDataSourceResource(new URL(url));
            return new SimpleResult(name, url, datasource);

        }
        catch (MalformedURLException e)
        {
View Full Code Here

Examples of uk.org.ogsadai.client.toolkit.presentation.jersey.JerseyServer

    @Override
    public void addExecutionEngine(String name, String address)
    {
        try
        {
            JerseyServer server = new JerseyServer(address);
            DataRequestExecutionResource drer =
                server.getDataRequestExecutionResource(
                        new ResourceID("DataRequestExecutionResource"));
             
            //set EE details
            SimpleLocation location = new SimpleLocation(drer);
            addExecutionEngine(name, location);
                     
            ResourceID[] resources =
                server.listResources(ResourceType.DATA_RESOURCE);
            for (ResourceID resourceID : resources)
            {
                String dataResourceName = name + "_" + resourceID;
                //set data source mapping
                addDataSourceMapping(dataResourceName, name);  
View Full Code Here

Examples of uk.org.ogsadai.client.toolkit.presentation.jersey.JerseyServer

   
    public void addExecutionEngine(String name, String address) throws Exception
    {
        try
        {
            JerseyServer server = new JerseyServer(address);
            DataRequestExecutionResource drer =
                server.getDataRequestExecutionResource(
                        new ResourceID("DataRequestExecutionResource"));
                 
            SimpleLocation location = new SimpleLocation(address, drer);
            addExecutionEngine(name, location);
      }
View Full Code Here

Examples of uk.org.ogsadai.client.toolkit.presentation.jersey.JerseyServer

            }
            LOG.debug("Received address of data transfer.");

            URL address = getAddress(transferName, gateway);
            LOG.debug("Address = " + address);
            JerseyServer server = new JerseyServer();
            DataSourceResource datasource = server.getDataSourceResource(address);           
            mOutput.write(datasource);
               
        }
        catch (PipeClosedException e)
        {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.