Package org.cspoker.common.api.shared.http

Examples of org.cspoker.common.api.shared.http.HTTPRequest


    SitInAnywhereAction action1 = new SitInAnywhereAction(eid1,tid,6500);
    queue.add(action1);
    BetOrRaiseAction action2 = new BetOrRaiseAction(eid2,tid,25);
    queue.add(action2);
   
    HTTPRequest request =  new HTTPRequest(queue);
   
    marschaller.marshal(request, output);
   
    HTTPResponse response = new HTTPResponse();
    response.addActionResult(new ActionPerformedEvent<Void>(action1,null));
View Full Code Here


      if(!state.getLeft().getAccountContext().hasPassword(credentials.getRight())){
        throw new LoginException("Bad Password");
      }
     
      Unmarshaller um = AllHTTPJAXBContexts.context.createUnmarshaller();
      HTTPRequest request = (HTTPRequest) um.unmarshal(new InputSource(http.getRequestBody()));

      HTTPResponse response = request.performRequest(state.getLeft(), state.getRight());

      StringWriter xml = new StringWriter();
      Marshaller m = AllHTTPJAXBContexts.context.createMarshaller();
      m.setProperty(Marshaller.JAXB_FRAGMENT, true);
      m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
View Full Code Here

    scheduler.shutdown();
    scheduler.shutdownNow();
  }

  public synchronized void sendRequest() {
    HTTPRequest request = new HTTPRequest(actions);
    BufferedReader in=null;
    try {
      HttpURLConnection connection = (HttpURLConnection) url
      .openConnection();
      connection.setRequestProperty("Authorization", authorizationString);
View Full Code Here

TOP

Related Classes of org.cspoker.common.api.shared.http.HTTPRequest

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.