Examples of Binding


Examples of at.bestsolution.efxclipse.runtime.bindings.Binding

    }
    return !sequenceBeforeKeyStroke.isEmpty();
  }
 
  private ParameterizedCommand getPerfectMatch(KeySequence keySequence) {
    Binding perfectMatch = getBindingService().getPerfectMatch(keySequence);
    return perfectMatch == null ? null : perfectMatch.getParameterizedCommand();
  }
View Full Code Here

Examples of be.demmel.jgws.cfg.jaxb.Binding

      } catch (Exception e) {
        // Add some understandable string
        throw new Exception("RMI connection failed : ", e);
      }

      Binding bindingConfiguration = gameServerConfiguration.getBinding();
      String bindingIp = bindingConfiguration.getIp();
      int bindingPort = bindingConfiguration.getPort();

      try {
        InetSocketAddress hostAndPort = new InetSocketAddress(InetAddress.getByName(bindingIp), bindingPort);
        GameServerPortalImpl gameServerPortal = new GameServerPortalImpl();
        int portalCallbackPort = gameServerConfiguration.getPortalCallbackPort();
View Full Code Here

Examples of bm.net.bind.Binding

            throws NetException,
                   SerializationException,
                   IOException,
                   RemoteCallException
    {
        final Binding binding = Binding.create();
        final ProgressEvent pe = new ProgressEvent();
        pe.setAnimate( true );
        pe.setSource( this );
        try
        {
            pe.setMessage( ResourceManager.getResource( "bm.net.rpc.SendingCall" ) );
            pe.dispatch();
            binding.open( url );
            final DataOutputStream dos = binding.beginPost();
            final ChecksumedOutputStream cos = new ChecksumedOutputStream( dos );
            final DataOutputStream dos2 = new DataOutputStream( cos );
            final SerializerOutputStream out = new SerializerOutputStream( dos2 );
            out.writeByte( VERSION );
            out.writeByte( (byte) (encrypted ? 1 : 0) );
            out.writeString( Net.getDeviceGuid() != null ? Net.getDeviceGuid() : "" );
            out.writeLong( Net.getDeviceId() != null ? Net.getDeviceId().longValue() : 0 );
            serialize( out );
            final long crc  = cos.getCRC();
            out.writeString( "END_OF_DATA" );
            out.writeLong( crc );
            pe.setMessage( ResourceManager.getResource( "bm.net.rpc.WaitingResponse" ) );
            pe.dispatch();
            log.debug( "Call serialized" );
            final DataInputStream is = binding.endPost();
            final SerializerInputStream in = new SerializerInputStream( is );
            pe.setMessage( ResourceManager.getResource( "bm.net.rpc.ReadingResponse" ) );
            pe.dispatch();
            final int responseCode = in.readInt();
            final String responseMessage = in.readString();
            if( responseCode == Net.RC_SUCCESS )
            {
                return in.readNullableObject();
            }
            else if( responseCode != Net.RC_INVALID_CRC )
            {
                log.error( "Unrecoverable error: " + responseCode + " " + responseMessage );
                throw new RemoteCallException(
                        Net.ERR_RC_UNRECOVERABLE_ERROR,
                        responseMessage
                );
            }
            else
            {
                log.error( "Invalid CRC" );
                throw new IOException( "Invalid CRC" ); // Perform retry
            }
        }
        finally
        {
            binding.close();
        }
    }
View Full Code Here

Examples of com.github.theholywaffle.teamspeak3.api.wrapper.Binding

  public List<Binding> getBindings() {
    CBindingList list = new CBindingList();
    if (query.doCommand(list)) {
      List<Binding> bindings = new ArrayList<>();
      for (HashMap<String, String> map : list.getResponse()) {
        bindings.add(new Binding(map));
      }
      return bindings;
    }
    return null;
  }
View Full Code Here

Examples of com.google.eclipse.protobuf.ui.preferences.pages.binding.Binding

    binder.addAll(
        bindSelectionOf(btnOneDirectoryOnly).to(factory.newBooleanPreference(FILES_IN_ONE_DIRECTORY_ONLY)),
        bindSelectionOf(btnMultipleDirectories).to(factory.newBooleanPreference(FILES_IN_MULTIPLE_DIRECTORIES))
      );
    final Preference<String> directoryPaths = factory.newStringPreference(DIRECTORY_PATHS);
    binder.add(new Binding() {
      @Override public void applyPreferenceValueToTarget() {
        setDirectoryPaths(directoryPaths.value());
      }

      @Override public void applyDefaultPreferenceValueToTarget() {
View Full Code Here

Examples of com.google.gwt.inject.rebind.binding.Binding

    // interface.
    for (MethodLiteral<?, Method> method :
        constructorInjectCollector.getMethods(ginjectorInterface)) {

      Key<?> methodKey = guiceUtil.getKey(method);
      Binding binding = bindings.getBinding(methodKey);
      if (binding == null) {
        // This should not happen, but fail with a meaningful message if it
        // does.
        logger.log(TreeLogger.Type.ERROR, "Unable to find a binding for the required key "
            + methodKey);
        throw new UnableToCompleteException();
      }

      if (!reachabilityAnalyzer.isReachable(binding)) {
        // Sanity-check reachability: every binding in the Ginjector ought to be
        // reachable.
        PrettyPrinter.log(logger, TreeLogger.Type.ERROR,
            "The key %s is required by the Ginjector, but is not reachable.", methodKey);
        throw new UnableToCompleteException();
      }

      FragmentPackageName fragmentPackageName = fragmentPackageNameFactory.create(
          binding.getGetterMethodPackage());

      String body = String.format("return %s.%s().%s();",
          ginjectorNameGenerator.getFieldName(bindings),
          nameGenerator.getFragmentGetterMethodName(fragmentPackageName),
          nameGenerator.getGetterMethodName(guiceUtil.getKey(method)));
View Full Code Here

Examples of com.google.gwt.jsio.client.Binding

    context = new FragmentGeneratorContext(context);
    context.parentLogger = logger;

    SourceWriter sw = context.sw;
    TypeOracle typeOracle = context.typeOracle;
    Binding bindingAnnotation = JSWrapperGenerator.hasTag(logger, binding,
        Binding.class);

    // Write the java half to add assertions to the code. These will be elided
    // in web mode, and the method become a pure delegation, allowing it to
    // be removed completely
    sw.print("public void ");
    sw.print(binding.getName());
    sw.print("(");
    JParameter[] params = binding.getParameters();

    context.parameterName = "jso";
    sw.print(params[0].getType().getQualifiedSourceName());
    sw.print(" ");
    sw.print(context.parameterName);

    JClassType bindingType = null;
    if (params.length == 2) {
      // Infer the binding type from the second parameter of the binding
      // method.
      bindingType = params[1].getType().isClassOrInterface();
      context.objRef = "obj";

      sw.print(", ");
      sw.print(bindingType.getQualifiedSourceName());
      sw.print(" ");
      sw.print(context.objRef);
    } else if (bindingAnnotation != null
        && bindingAnnotation.value().length() > 0) {
      // Use the binding type specified in the the gwt.binding annotation.
      bindingType = typeOracle.findType(bindingAnnotation.value());
      if (bindingType == null) {
        logger.log(TreeLogger.ERROR, "Could not resolve binding type "
            + bindingType, null);
        throw new UnableToCompleteException();
      }
View Full Code Here

Examples of com.google.gwt.search.jsio.client.Binding

    context = new FragmentGeneratorContext(context);
    context.parentLogger = logger;

    SourceWriter sw = context.sw;
    TypeOracle typeOracle = context.typeOracle;
    Binding bindingAnnotation = JSWrapperGenerator.hasTag(logger, binding,
        Binding.class);

    // Write the java half to add assertions to the code. These will be elided
    // in web mode, and the method become a pure delegation, allowing it to
    // be removed completely
    sw.print("public void ");
    sw.print(binding.getName());
    sw.print("(");
    JParameter[] params = binding.getParameters();

    context.parameterName = "jso";
    sw.print(params[0].getType().getQualifiedSourceName());
    sw.print(" ");
    sw.print(context.parameterName);

    JClassType bindingType = null;
    if (params.length == 2) {
      // Infer the binding type from the second parameter of the binding
      // method.
      bindingType = params[1].getType().isClassOrInterface();
      context.objRef = "obj";

      sw.print(", ");
      sw.print(bindingType.getQualifiedSourceName());
      sw.print(" ");
      sw.print(context.objRef);
    } else if (bindingAnnotation != null
        && bindingAnnotation.value().length() > 0) {
      // Use the binding type specified in the the gwt.binding annotation.
      bindingType = typeOracle.findType(bindingAnnotation.value());
      if (bindingType == null) {
        logger.log(TreeLogger.ERROR, "Could not resolve binding type "
            + bindingType, null);
        throw new UnableToCompleteException();
      }
View Full Code Here

Examples of com.google.inject.Binding

      if(!contains) {
        otherElements.add(element);
      }
      boolean matched = false;
      Key key = null;
      Binding b = null;
      if(element instanceof Binding) {
        b = (Binding)element;
        if (b instanceof ProviderInstanceBinding) {
          ProviderInstanceBinding<?> pb = (ProviderInstanceBinding<?>) b;
          if (pb.getUserSuppliedProvider() instanceof ProviderMapEntry) {
            // weird casting required to workaround jdk6 compilation problems
            ProviderMapEntry<?, ?> pme =
                (ProviderMapEntry<?, ?>) (Provider) pb.getUserSuppliedProvider();
            Binding<?> valueBinding = keyMap.get(pme.getValueKey());
            if (indexer.isIndexable(valueBinding)
                && !indexedEntries.put(pme.getKey(), valueBinding.acceptTargetVisitor(indexer))) {
              duplicates++;
            }
          }
        }

        key = b.getKey();
        Object visited = b.acceptTargetVisitor(visitor);
        if(visited instanceof MapBinderBinding) {
          matched = true;
          if(visited.equals(mapbinder)) {
            assertTrue(contains);
          } else {
            otherMapBindings.add(visited);
          }
        }
      } else if(element instanceof ProviderLookup) {
        key = ((ProviderLookup)element).getKey();
      }
     
      if(!matched && key != null) {
        if(key.equals(mapOfProvider)) {
          matched = true;
          assertTrue(contains);
          mapProviderMatch = true;
        } else if(key.equals(mapOfJavaxProvider)) {
          matched = true;
          assertTrue(contains);
          mapJavaxProviderMatch = true;
        } else if(key.equals(mapOfSet)) {
          matched = true;
          assertTrue(contains);
          mapSetMatch = true;
        } else if(key.equals(mapOfSetOfProvider)) {
          matched = true;
          assertTrue(contains);
          mapSetProviderMatch = true;
        } else if(key.equals(setOfEntry)) {
          matched = true;
          assertTrue(contains);
          entrySetMatch = true;
          // Validate that this binding is also a MultibinderBinding.
          if(b != null) {
            assertTrue(b.acceptTargetVisitor(visitor) instanceof MultibinderBinding);
          }
        } else if(key.equals(collectionOfProvidersOfEntry)) {
          matched = true;
          assertTrue(contains);
          collectionOfProvidersOfEntryMatch = true;
View Full Code Here

Examples of com.hp.hpl.jena.query.core.Binding

  @Override
  protected Binding moveToNextBinding()
  {
    if (!hasMore) return null;
   
    Binding toReturn = newBinding;
   
    calcHasMore();
   
    return toReturn;
  }
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.