Package org.restlet

Examples of org.restlet.Component.stop()


                + "/user/johnm/uVGYTDK4kK4zsu96VHGeTCzfwso%253D/";
        testCall(context, Method.GET, uri);

        // Stop the components
        clientComponent.stop();
        originComponent.stop();
        proxyComponent.stop();
    }
}
View Full Code Here


        System.out.println("Server started on port " + server.getPort());
        System.out.println("Press key to stop server");
        System.in.read();
        System.out.println("Stopping server");
        comp.stop();
        System.out.println("Server stopped");
    }
}
View Full Code Here

            rep = null;
            res = new ClientResource("riap://component/app/testB");
            rep = res.get();
            assertEquals("hello, world", rep.getText());

            component.stop();
        } catch (Exception e) {
            fail(e.getMessage());
        }
    }
}
View Full Code Here

                assertEquals("Method=${m}/Path=${rp}", response.getEntity()
                        .getText());
            }

            // Now, let's stop the component!
            component.stop();
            client.stop();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
View Full Code Here

        // Test the access to the sub directories.
        testDirectoryDeeplyAccessible(application, application.getDirectory());

        // Now, let's stop the component!
        clientComponent.stop();
    }

    /**
     * Helper
     *
 
View Full Code Here

        assertTrue(response.isEntityAvailable());
        response = client.handle(new Request(Method.GET, "http://localhost:"
                + this.port2 + "/efgh"));
        assertTrue(response.getStatus().isClientError());

        component.stop();
        client.stop();
    }
}
View Full Code Here

        // Start the Restlet component
        Component component = (Component) factory.getBean("component");
        component.start();
        Thread.sleep(500);
        component.stop();
    }

    public void testSpringServerProperties() {
        ClassPathResource resource = new ClassPathResource(
                "org/restlet/test/ext/spring/SpringTestCase.xml");
View Full Code Here

    Component component = new Component();
    component.getServers().add(Protocol.HTTP, 8182);
    PlexusRestletApplicationBridge app = (PlexusRestletApplicationBridge) getContainer().lookup(Application.class);
    component.getDefaultHost().attach(app);
    component.start();
    component.stop();
  }
}
View Full Code Here

    Status status = post(URL, VALID).getStatus();
    assertTrue(status.toString(), status.isSuccess());
    status = post(URL, INVALID).getStatus();
    assertEquals(status.toString(), 400, status.getCode());

    component.stop();
  }

  private Response post(String url, String content) {
    Request request = new Request();
    request.setResourceRef(url);
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.