Package pivot.web

Examples of pivot.web.GetQuery


    public void resume() {
    }

    @SuppressWarnings("unchecked")
    private void refreshTable() {
        getQuery = new GetQuery(SERVICE_HOSTNAME, SERVICE_PATH);

        StringBuilder symbolsArgumentBuilder = new StringBuilder();
        for (int i = 0, n = symbols.getLength(); i < n; i++) {
            if (i > 0) {
                symbolsArgumentBuilder.append(",");
View Full Code Here


    public void resume() {
    }

    @SuppressWarnings("unchecked")
    private void refreshTable() {
        getQuery = new GetQuery(SERVICE_HOSTNAME, SERVICE_PATH);

        StringBuilder symbolsArgumentBuilder = new StringBuilder();
        for (int i = 0, n = symbols.getLength(); i < n; i++) {
            if (i > 0) {
                symbolsArgumentBuilder.append(",");
View Full Code Here

    public void startup(Display display, Dictionary<String, String> properties)
      throws Exception {
        final BasicAuthentication authentication = new BasicAuthentication("foo", "bar");

        // GET
        final GetQuery getQuery = new GetQuery(HOSTNAME, PORT, PATH, SECURE);
        getQuery.getArguments().put("a", "b");
        getQuery.setSerializer(new BinarySerializer());
        authentication.authenticate(getQuery);

        getQuery.execute(new TaskListener<Object>() {
            @SuppressWarnings("unchecked")
            public void taskExecuted(Task<Object> task) {
                Dictionary<String, Object> result = (Dictionary<String, Object>)task.getResult();

                System.out.println("GET result: "
View Full Code Here

      String fileName = (String)fileListButton.getSelectedItem();

      URL origin = ApplicationContext.getOrigin();
      System.out.println(origin);

      getQuery = new GetQuery(origin.getHost(), origin.getPort(), basePath + fileName, false);
      String location = getQuery.getLocation().toString();
      statusLabel.setText("Loading data from " + location);
      System.out.println(location);

      getQuery.setSerializer(csvSerializer);
View Full Code Here

    public static void main(String[] args) throws Exception {
        final BasicAuthentication authentication = new BasicAuthentication("foo", "bar");

        // GET
        final GetQuery getQuery = new GetQuery(HOSTNAME, PORT, PATH, SECURE);
        getQuery.getParameters().put("a", "b");
        getQuery.setSerializer(new BinarySerializer());
        getQuery.getRequestHeaders().add("bar", "hello");
        getQuery.getRequestHeaders().add("bar", "world");
        authentication.authenticate(getQuery);

        getQuery.execute(new TaskListener<Object>() {
            @SuppressWarnings("unchecked")
            public void taskExecuted(Task<Object> task) {
                GetQuery getQuery = (GetQuery)task;
                Dictionary<String, Object> result = (Dictionary<String, Object>)getQuery.getResult();

                System.out.println("GET result: "
                    + "username: " + result.get("username") + ", "
                    + "pathInfo: " + result.get("pathInfo") + ", "
                    + "queryString: " + result.get("queryString") + ", "
                    + "status: " + getQuery.getStatus());

                QueryDictionary responseHeaders = getQuery.getResponseHeaders();
                for (String headerName : responseHeaders) {
                    System.out.print(headerName + "=");

                    for (int i = 0, n = responseHeaders.getLength(headerName); i < n; i++) {
                        System.out.print(responseHeaders.get(headerName, i) + ";");
View Full Code Here

TOP

Related Classes of pivot.web.GetQuery

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.