Examples of OperationKey


Examples of com.betfair.cougar.core.api.ev.OperationKey

    out.writeString(operationKey.getOperationName());
  }

  public OperationKey readOperationKey(CougarObjectInput in) throws IOException {
        EnumUtils.setHardFailureForThisThread(hardFailEnumDeserialisation);
    return new OperationKey(
        new ServiceVersion(in.readInt(), in.readInt()),
        in.readString(),
        in.readString());
  }
View Full Code Here

Examples of com.betfair.cougar.core.api.ev.OperationKey

                    }
                }
                byte protocolVersion = CougarProtocol.getProtocolVersion(command.getSession());
                ExecutionContextWithTokens context = marshaller.readExecutionContext(in, command.getRemoteAddress(), clientCertChain, transportSecurityStrengthFactor, protocolVersion);
                final SocketRequestContextImpl requestContext = new SocketRequestContextImpl(context);
                OperationKey remoteOperationKey = marshaller.readOperationKey(in);
                OperationDefinition opDef = findCompatibleBinding(remoteOperationKey);
                if (opDef == null) {
                    throw new CougarFrameworkException("Can't find operation definition in bindings for operation named '" + remoteOperationKey.getOperationName() + "'");
                }
                final OperationKey operationKey = opDef.getOperationKey(); // safer to read it from locally
                final OperationDefinition operationDefinition = getExecutionVenue().getOperationDefinition(operationKey);
                final Object[] args = marshaller.readArgs(operationDefinition.getParameters(), in);
                TimeConstraints rawTimeConstraints = marshaller.readTimeConstraintsIfPresent(in, protocolVersion);
                final TimeConstraints timeConstraints = DefaultTimeConstraints.rebaseFromNewStartTime(context.getRequestTime(), rawTimeConstraints);
                final ExecutionCommand exec = new ExecutionCommand() {

                    @Override
                    public Object[] getArgs() {
                        return args;
                    }

                    @Override
                    public OperationKey getOperationKey() {
                        return operationKey;
                    }

                    @Override
                    public void onResult(ExecutionResult result) {
                        if (result.getResultType() == ExecutionResult.ResultType.Success) {
                            if (operationKey.getType() == OperationKey.Type.ConnectedObject) {
                                connectedObjectManager.addSubscription(SocketTransportCommandProcessor.this, rpcCommand, (ConnectedResponse) result.getResult(), operationDefinition, requestContext, requestContext.getConnectedObjectLogExtension());
                            } else {
                                writeSuccessResponse(rpcCommand, result);
                            }
                        } else if (result.getResultType() == ExecutionResult.ResultType.Fault) {
View Full Code Here

Examples of com.betfair.cougar.core.api.ev.OperationKey

        OperationDefinition ret = bindings.get(remoteOperationKey);
        if (ret != null) {
            return ret;
        }
        // if the client is requesting the same major version of this method, then let it through..
        OperationKey myKeyForThisMethod = namedOperations.get(remoteOperationKey.toString(false));
        // ie, we've never heard of this method
        if (myKeyForThisMethod == null) {
            return null;
        }
        ServiceVersion myVersion = myKeyForThisMethod.getVersion();
        ServiceVersion remoteVersion = remoteOperationKey.getVersion();
        if (myVersion.getMajor() == remoteVersion.getMajor()) {
            return bindings.get(myKeyForThisMethod);
        }
        return null;
View Full Code Here

Examples of com.betfair.cougar.core.api.ev.OperationKey

    out.writeString(operationKey.getOperationName());
  }

  public OperationKey readOperationKey(CougarObjectInput in) throws IOException {
        EnumUtils.setHardFailureForThisThread(hardFailEnumDeserialisation);
    return new OperationKey(
        new ServiceVersion(in.readInt(), in.readInt()),
        in.readString(),
        in.readString());
  }
View Full Code Here

Examples of com.betfair.cougar.core.api.ev.OperationKey

                    }
                }
                byte protocolVersion = CougarProtocol.getProtocolVersion(command.getSession());
                ExecutionContextWithTokens context = marshaller.readExecutionContext(in, command.getRemoteAddress(), clientCertChain, transportSecurityStrengthFactor, protocolVersion);
                final SocketRequestContextImpl requestContext = new SocketRequestContextImpl(context);
                OperationKey remoteOperationKey = marshaller.readOperationKey(in);
                OperationDefinition opDef = findCompatibleBinding(remoteOperationKey);
                if (opDef == null) {
                    throw new CougarFrameworkException("Can't find operation definition in bindings for operation named '" + remoteOperationKey.getOperationName() + "'");
                }
                final OperationKey operationKey = opDef.getOperationKey(); // safer to read it from locally
                final OperationDefinition operationDefinition = getExecutionVenue().getOperationDefinition(operationKey);
                final Object[] args = marshaller.readArgs(operationDefinition.getParameters(), in);
                TimeConstraints rawTimeConstraints = marshaller.readTimeConstraintsIfPresent(in, protocolVersion);
                final TimeConstraints timeConstraints = DefaultTimeConstraints.rebaseFromNewStartTime(context.getRequestTime(), rawTimeConstraints);
                final ExecutionCommand exec = new ExecutionCommand() {

                    @Override
                    public Object[] getArgs() {
                        return args;
                    }

                    @Override
                    public OperationKey getOperationKey() {
                        return operationKey;
                    }

                    @Override
                    public void onResult(ExecutionResult result) {
                        if (result.getResultType() == ExecutionResult.ResultType.Success) {
                            if (operationKey.getType() == OperationKey.Type.ConnectedObject) {
                                connectedObjectManager.addSubscription(SocketTransportCommandProcessor.this, rpcCommand, (ConnectedResponse) result.getResult(), operationDefinition, requestContext, requestContext.getConnectedObjectLogExtension());
                            } else {
                                writeSuccessResponse(rpcCommand, result);
                            }
                        } else if (result.getResultType() == ExecutionResult.ResultType.Fault) {
View Full Code Here

Examples of com.betfair.cougar.core.api.ev.OperationKey

        OperationDefinition ret = bindings.get(remoteOperationKey);
        if (ret != null) {
            return ret;
        }
        // if the client is requesting the same major version of this method, then let it through..
        OperationKey myKeyForThisMethod = namedOperations.get(remoteOperationKey.toString(false));
        // ie, we've never heard of this method
        if (myKeyForThisMethod == null) {
            return null;
        }
        ServiceVersion myVersion = myKeyForThisMethod.getVersion();
        ServiceVersion remoteVersion = remoteOperationKey.getVersion();
        if (myVersion.getMajor() == remoteVersion.getMajor()) {
            return bindings.get(myKeyForThisMethod);
        }
        return null;
View Full Code Here

Examples of com.google.web.bindery.requestfactory.vm.impl.OperationKey

        } else {
          domainMethodDescriptor = domainElement.asType().accept(new DescriptorBuilder(), state);
        }
        String methodName = x.getSimpleName().toString();

        OperationKey key =
            new OperationKey(requestContextBinaryName, methodName, clientMethodDescriptor);
        println("withOperation(new OperationKey(\"%s\"),", key.get());
        println("  new OperationData.Builder()");
        println("  .withClientMethodDescriptor(\"%s\")", clientMethodDescriptor);
        if (domainMethodDescriptor != null) {
          println("  .withDomainMethodDescriptor(\"%s\")", domainMethodDescriptor);
        }
View Full Code Here

Examples of org.netbeans.modules.openoffice.wizard.keys.OperationKey

    {
        String s = new String();
        for(int j = 0; j < i; j++)
            s = s + "    ";

        OperationKey operationkey = (OperationKey)key;
        if(operationkey.isOneway())
            s = s + "[oneway] ";
        s = s + operationkey.getReturnType() + " ";
        s = s + getName() + " (";
        s = s + operationkey.getParameters() + ")";
        if(operationkey.getExceptions().length() > 0)
            s = s + " raises (" + operationkey.getExceptions() + ")";
       
        s = s + ";\n";
        return s;
    }
View Full Code Here

Examples of org.netbeans.modules.openoffice.wizard.keys.OperationKey

    public BasePanel getEditPanel()
    {
        OperationPanel operationpanel = new OperationPanel();
        operationpanel.setName(getName());
        OperationKey operationkey = (OperationKey)key;
        operationpanel.setExceptions(operationkey.getExceptions());
        operationpanel.setOneway(operationkey.isOneway());
        operationpanel.setParameters(operationkey.getParameters());
        operationpanel.setReturnType(operationkey.getReturnType());
        return operationpanel;
    }
View Full Code Here

Examples of org.netbeans.modules.openoffice.wizard.keys.OperationKey

    public void reInit(BasePanel BasePanel)
    {
        if(BasePanel instanceof OperationPanel)
        {
            OperationPanel operationpanel = (OperationPanel)BasePanel;
            OperationKey operationkey = (OperationKey)key;
            String s = operationpanel.getName();
            String s2 = operationpanel.getReturnType();
            String s3 = operationpanel.getParameters();
            String s4 = operationpanel.getExceptions();
            boolean flag = operationpanel.isOneway();
            if(!operationkey.getName().equals(s))
            {
                setName(s);
                operationkey.setName(s);
            }
           if(!operationkey.getExceptions().equals(s4))
                operationkey.setExceptions(s4);
            if(!operationkey.getParameters().equals(s3))
                operationkey.setParameters(s3);
            if(!operationkey.getReturnType().equals(s2))
                operationkey.setReturnType(s2);
            if(operationkey.isOneway() != flag)
                operationkey.setOneway(flag);
        }
    }
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.