Examples of Call


Examples of org.cspoker.external.pokersource.commands.poker.Call

        @Override
        public void onSelfInPosition(SelfInPosition selfInPosition) {
          super.onSelfInPosition(selfInPosition);
          try {
            conn.send(new Call(serial, game_id));
          } catch (IOException e) {
            throw new IllegalStateException(e);
          }
        }
View Full Code Here

Examples of org.directwebremoting.extend.Call

                    i++;
                }
            }
        }

        Call call = new Call(null, pathParts[2], pathParts[3]);

        // JSON does not support batching
        Calls calls = new Calls();
        calls.addCall(call);

        // Which method are we using?
        call.findMethod(moduleManager, converterManager, inboundContext, 0);
        MethodDeclaration method = call.getMethodDeclaration();

        // Check this method is accessible
        accessControl.assertGeneralExecutionIsPossible(call.getScriptName(), method);

        // We are now sure we have the set of input lined up. They may
        // cross-reference so we do the de-referencing all in one go.
        try
        {
            inboundContext.dereference();
        }
        catch (ConversionException ex)
        {
            log.warn("Dereferencing exception", ex);
            throw new JsonpCallException("Error dereferencing call. See logs for more details.");
        }

        // Convert all the parameters to the correct types
        Object[] params = new Object[method.getParameterTypes().length];
        for (int j = 0; j < method.getParameterTypes().length; j++)
        {
            Class<?> paramType = method.getParameterTypes()[j];
            InboundVariable param = inboundContext.getParameter(0, j);
            Property property = new ParameterProperty(method, j);

            try
            {
                params[j] = converterManager.convertInbound(paramType, param, property);
            }
            catch (ConversionException ex)
            {
                log.warn("Marshalling exception. Param " + j + ", ", ex);
                throw new JsonpCallException("Error marshalling parameters. See logs for more details.");
            }
        }

        call.setParameters(params);

        return calls;
    }
View Full Code Here

Examples of org.fcrepo.server.management.MockManagementDelegate.Call

    private void buildExpectedCall(String methodName, Object[] arguments) {
        loadExpectedContext();
        if (arguments[0] == leadingContext) {
            arguments[0] = expectedContext;
        }
        expectedCall = new Call(methodName, arguments);
    }
View Full Code Here

Examples of org.gnubridge.core.bidding.Call

    }
    return validOpeningAndResponse();
  }

  private boolean validOpeningAndResponse() {
    Call responderCall = auction.getPartnersLastCall();
    if (responderCall != null && responderCall.getBid().hasTrump()) {
      Call myOpeningBid = auction.getPartnersCall(responderCall);
      if (myOpeningBid != null && myOpeningBid.getBid().hasTrump() && auction.isOpening(myOpeningBid)) {
        return true;
      }
    }
    return false;
  }
View Full Code Here

Examples of org.h2.command.dml.Call

        TableFilter filter = new TableFilter(session, table, null, rightsChecked, currentSelect);
        return filter;
    }

    private Call parseCall() {
        Call command = new Call(session);
        currentPrepared = command;
        command.setExpression(readExpression());
        return command;
    }
View Full Code Here

Examples of org.ibeans.annotation.Call

*/
public class CallAnnotationParser extends AbstractEndpointAnnotationParser
{
    protected AnnotatedEndpointData createEndpointData(Annotation annotation) throws MuleException
    {
        Call call = (Call) annotation;
        AnnotatedEndpointData epd = new AnnotatedEndpointData(MessageExchangePattern.REQUEST_RESPONSE, ChannelType.Outbound, call);
        epd.setAddress(call.uri());
        epd.setProperties(AnnotatedEndpointData.convert(call.properties()));
        return epd;
    }
View Full Code Here

Examples of org.jboss.seam.remoting.Call

         result.setSecret("bar");

         ByteArrayOutputStream out = new ByteArrayOutputStream();
        
         // Constrain a single field of the result
         Call c = new Call(null, null, null);
         c.setConstraints(Arrays.asList(new String[] { "secret" }));
         c.setResult(result);
         MarshalUtils.marshalResult(c, out);

         SAXReader xmlReader = new SAXReader();
         Document doc = xmlReader.read(new StringReader(new String(out
               .toByteArray())));

         Widget widget = (Widget) ParserUtils.unmarshalResult(doc
               .getRootElement());

         // value field should equal "foo"
         assert "foo".equals(widget.getValue());

         // secret field should be null
         assert widget.getSecret() == null;

         // Now extend our object graph a little further
         result.setChild(new Widget());
         result.getChild().setValue("foo");
         result.getChild().setSecret("bar");

         // Reset our output stream so we can re-use it
         out.reset();

         // Now we're going to constrain result.child's secret field
         c.setConstraints(Arrays.asList(new String[] { "child.secret" }));
         MarshalUtils.marshalResult(c, out);

         doc = xmlReader.read(new StringReader(new String(out.toByteArray())));
         widget = (Widget) ParserUtils.unmarshalResult(doc.getRootElement());
         assert "foo".equals(widget.getValue());
         assert "bar".equals(widget.getSecret());
         assert "foo".equals(widget.getChild().getValue());
         assert widget.getChild().getSecret() == null;

         // Add a map to our result
         result.setWidgetMap(new HashMap<String, Widget>());
         Widget val = new Widget();
         val.setValue("foo");
         val.setSecret("bar");
         result.getWidgetMap().put("foo", val);

         // Reset our output stream again
         out.reset();

         // Constrain the "secret" field of the widgetMap map's values (sounds
         // confusing, I know...)
         c.setConstraints(Arrays.asList(new String[] { "widgetMap[value].secret" }));
         MarshalUtils.marshalResult(c, out);

         doc = xmlReader.read(new StringReader(new String(out.toByteArray())));
         widget = (Widget) ParserUtils.unmarshalResult(doc.getRootElement());
         val = widget.getWidgetMap().get("foo");
         assert val != null;
         assert "foo".equals(val.getValue());
         assert val.getSecret() == null;

         // Reset our output stream
         out.reset();

         // Add a list to our result
         result.setWidgetList(new ArrayList<Widget>());
         Widget item = new Widget();
         item.setValue("foo");
         item.setSecret("bar");
         result.getWidgetList().add(item);

         // Constraint the "secret" field of widgetList
         c.setConstraints(Arrays.asList(new String[] { "widgetList.secret" }));
         MarshalUtils.marshalResult(c, out);

         doc = xmlReader.read(new StringReader(new String(out.toByteArray())));
         widget = (Widget) ParserUtils.unmarshalResult(doc.getRootElement());
         item = widget.getWidgetList().get(0);
         assert item != null;
         assert "foo".equals(item.getValue());
         assert item.getSecret() == null;

         // Reset our output stream
         out.reset();

         // Now constrain all secrets
         c.setConstraints(Arrays.asList(new String[] { "[" + Widget.class.getName() + "].secret" }));
         MarshalUtils.marshalResult(c, out);

         doc = xmlReader.read(new StringReader(new String(out.toByteArray())));
         widget = (Widget) ParserUtils.unmarshalResult(doc.getRootElement());
View Full Code Here

Examples of org.jboss.soa.esb.addressing.Call

      System.out.println(message.getHeader().getCall().getMessageID());
  }

  private final void deliver (String url) throws Exception
  {
    Call call = new Call(getEpr(url));
    call.setMessageID(new URI(UUID.randomUUID().toString()));

    Message message = MessageFactory.getInstance().getMessage();
    message.getHeader().setCall(call);
    message.getBody().add("Hello World".getBytes());
    Courier courier = CourierFactory.getCourier(call.getTo());

    courier.deliver(message);
  }
View Full Code Here

Examples of org.lealone.command.dml.Call

        TableFilter filter = new TableFilter(session, table, null, rightsChecked, currentSelect);
        return filter;
    }

    private Call parseCall() {
        Call command = new Call(session);
        currentPrepared = command;
        command.setExpression(readExpression());
        return command;
    }
View Full Code Here

Examples of org.python.antlr.ast.Call

        });

        if (callNodes[0] instanceof If) {
            PyObject testObject = ((If) callNodes[0]).getTest();
            if (testObject instanceof Call) {
                Call test = (Call) testObject;
                PyObject functionObject = test.getFunc();
                if (functionObject instanceof Name) {
                    Name funcName = (Name) functionObject;
                    if (funcName.getInternalId().equals("window")) {
                        expr windowNameObject = test.getInternalArgs().get(0);
                        if (windowNameObject instanceof Str) {
                            String windowName = ((Str) windowNameObject).getS().toString();
                            return windowName;
                        }
                    }
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.