Examples of Factory


Examples of org.apache.thrift.protocol.TBinaryProtocol.Factory

                InterruptedException {
              enqueue(e);
              super.append(e);
            }
          }));
      Factory protFactory = new TBinaryProtocol.Factory(true, true);

      TSaneServerSocket serverTransport = new TSaneServerSocket(port);
      server = new TSaneThreadPoolServer(processor, serverTransport,
          protFactory);
      LOG.info(String.format(
View Full Code Here

Examples of org.apache.zookeeper.server.NIOServerCnxn.Factory

                zks.addCommittedProposal(request);
            }
        }

        if (request.hdr != null && request.hdr.getType() == OpCode.closeSession) {
            Factory scxn = zks.getServerCnxnFactory();
            // this might be possible since
            // we might just be playing diffs from the leader
            if (scxn != null) {
                scxn.closeSession(request.sessionId);
            }
        }

        if (request.cnxn == null) {
            return;
View Full Code Here

Examples of org.apache.zookeeper_voltpatches.server.NIOServerCnxn.Factory

                rc = getZKDatabase().processTxn(request.hdr, request.txn);
            }
        }

        if (request.hdr != null && request.hdr.getType() == OpCode.closeSession) {
            Factory scxn = getServerCnxnFactory();
            // this might be possible since
            // we might just be playing diffs from the leader
            if (scxn != null && request.cnxn == null) {
                // calling this if we have the cnxn results in the client's
                // close session response being lost - we've already closed
                // the session/socket here before we can send the closeSession
                // in the switch block below
                scxn.closeSession(request.sessionId);
                return;
            }
        }

        if (request.cnxn == null) {
View Full Code Here

Examples of org.ardverk.dht.Factory

public class NodeResponseHandlerTest {
 
  private static List<DHT> createDHTs(int count, int port) throws IOException {
   
    Factory factory = Factory.sha1();
   
    List<DHT> dhts = new ArrayList<DHT>(count);
   
    boolean success = false;
    try {
      for (int i = 0; i < count; i++) {
        int prt = port+i;
       
        DHT dht = factory.newDHT(prt);
       
        dht.bind(new DatagramTransport(
            new BencodeMessageCodec(), prt));
        dhts.add(dht);
      }
View Full Code Here

Examples of org.eclipse.emf.ecore.resource.Resource.Factory

  public Factory getFactory(URI uri)
  {
    /*return getFactory(uri, null);*/
    String uriString = uri.toString();

    Factory factory = parent.getFactory(uri);
    Factory defaultFactory = (Factory)INSTANCE.getFactory(URI.createURI(DEFAULT_EXTENSION));

    // give the parent the first crack at getting the factory
    // if the factory is null or the known 'default' factory then we'll
    // try to compute the factory ourselves
    if (factory == null || factory == defaultFactory)
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.apt.model.Factory

    _addedUnits = new ArrayList<ICompilationUnit>();
    _addedClassFiles = new ArrayList<ReferenceBinding>();
    _deletedUnits = new ArrayList<ICompilationUnit>();
    _elementUtils = new ElementsImpl(this);
    _typeUtils = new TypesImpl(this);
    _factory = new Factory(this);
    _errorRaised = false;
  }
View Full Code Here

Examples of org.geotools.factory.Factory

     */
    public static Version getVersion(final String authority) throws FactoryRegistryException {
        Object candidate = ReferencingFactoryFinder.getCRSAuthorityFactory(authority, null);
        final Set<Factory> guard = new HashSet<Factory>();
        while (candidate instanceof Factory) {
            final Factory factory = (Factory) candidate;
            if (!guard.add(factory)) {
                break; // Safety against never-ending recursivity.
            }
            final Map hints = factory.getImplementationHints();
            final Object version = hints.get(Hints.VERSION);
            if (version instanceof Version) {
                return (Version) version;
            }
            candidate = hints.get(Hints.CRS_AUTHORITY_FACTORY);
View Full Code Here

Examples of org.glassfish.hk2.api.Factory

        }
        return null;
    }

    private Factory asFactory(final ServiceHandle handle) {
        return new Factory() {
            @Override
            public Object provide() {
                return handle.getService();
            }
View Full Code Here

Examples of org.gradle.api.internal.Factory

                    return getService(Factory.class);
                }
            }

            for (Type interfaceType : c.getGenericInterfaces()) {
                Factory f = getFactory(interfaceType, elementType);
                if (f != null) {
                    return f;
                }
            }
View Full Code Here

Examples of org.gradle.internal.Factory

            allowing(artifactStub).getExtension();
            will(returnValue(extension));
            allowing(artifactStub).getClassifier();
            will(returnValue(null));
        }});
        final Factory artifactSource = context.mock(Factory.class);
        context.checking(new Expectations() {{
            allowing(artifactSource).create();
            will(returnValue(file));
        }});
        final ResolvedDependency resolvedDependency = context.mock(ResolvedDependency.class);
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.