Examples of Protocol


Examples of com.sun.grizzly.config.dom.Protocol

        try {

            ConfigSupport.apply(new SingleConfigCode<Protocols>() {
                public Object run(Protocols param) throws TransactionFailure {
                    final Protocol protocol = param.createChild(Protocol.class);
                    protocol.setName(listenerName);
                    protocol.setSecurityEnabled(securityEnabled);
                    param.getProtocol().add(protocol);
                    final Http http = protocol.createChild(Http.class);
                    http.setDefaultVirtualServer(defaultVS);
                    http.setFileCache(http.createChild(FileCache.class));
                    protocol.setHttp(http);
                    return protocol;
                }
            }, networkConfig.getProtocols());

            ConfigSupport.apply(new ConfigCode() {
                public Object run(ConfigBeanProxy... params) throws TransactionFailure {
                    NetworkListeners nls = (NetworkListeners) params[0];
                    Transports transports = (Transports) params[1];
                    final NetworkListener listener = nls.createChild(NetworkListener.class);
                    listener.setName(listenerName);
                    listener.setPort(Integer.toString(portNumber));
                    listener.setProtocol(listenerName);
                    listener.setThreadPool("http-thread-pool");
                    if (listener.findThreadPool() == null) {
                        final ThreadPool pool = nls.createChild(ThreadPool.class);
                        pool.setName(listenerName);
                        listener.setThreadPool(listenerName);
                    }
                    listener.setTransport("tcp");
                    if (listener.findTransport() == null) {
                        final Transport transport = transports.createChild(Transport.class);
                        transport.setName(listenerName);
                        listener.setTransport(listenerName);
                    }
                    nls.getNetworkListener().add(listener);
                    return listener;
                }
            }, networkConfig.getNetworkListeners(), networkConfig.getTransports());
           
            if (webListener.getProtocol().equals("https")) {
                NetworkListener networkListener = networkConfig.getNetworkListener(listenerName);
                Protocol httpProtocol = networkListener.findHttpProtocol();
                ConfigSupport.apply(new SingleConfigCode<Protocol>() {
                    public Object run(Protocol param) throws TransactionFailure {
                        Ssl newSsl = param.createChild(Ssl.class);
                        populateSslElement(newSsl, listener);
                        param.setSsl(newSsl);
View Full Code Here

Examples of com.sun.midp.io.j2me.http.Protocol

        if (!getInstallNotificationForRetry(suite.getID(), notification)) {
            return;
        }

        try {
            Protocol httpConnection = new Protocol();

            httpConnection.openPrim(token, notification.url);
            postMsgBackToProvider(SUCCESS_MSG, httpConnection, null, null);
            removeInstallNotification(notification.suiteId);
        } catch (Throwable t) {
            if (notification.retries >=
                Constants.MAX_INSTALL_DELETE_NOTIFICATION_RETRIES) {
View Full Code Here

Examples of com.thoughtworks.acceptance.someobjects.Protocol

                "  </handlers>" +
                "</handlerManager>";

        HandlerManager hm = (HandlerManager) xstream.fromXML(xml);
        Handler h = (Handler) hm.getHandlers().get(0);
        Protocol p = h.getProtocol();
        assertEquals("foo", p.getId());
    }
View Full Code Here

Examples of ecks.protocols.Protocol

    static Configuration myConf = new Configuration(); // hold our configuration

    public static void main(String[] args) throws Exception {

        // declare our protocol
        Protocol myProto = null;
        try {
            myProto = (Protocol) Class.forName(Configuration.Config.get("protocol")).newInstance();
        } catch (InstantiationException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
View Full Code Here

Examples of net.nutch.protocol.Protocol

      }
    }

    LOG.info("fetching: "+url);

    Protocol protocol = ProtocolFactory.getProtocol(url);
    Content content = protocol.getContent(url);

    if (force) {
      content.setContentType(contentType);
    } else {
      contentType = content.getContentType();
View Full Code Here

Examples of net.sf.myway.gps.garmin.protocol.Protocol

   * @param currentProtocol
   * @param i
   * @return Protocol
   */
  private Protocol extractAProtocol(final ProtocolInfo info, final Protocol oldProtocol) {
    Protocol currentProtocol = oldProtocol;
    try {
      final AProtocol a = Enum.valueOf(AProtocol.class, info.getName());
      currentProtocol = a.configure(_config);
    }
    catch (final IllegalArgumentException e) {
View Full Code Here

Examples of net.spy.memcached.ConnectionFactoryBuilder.Protocol

                         ? 3600
                         : config.expiration().get();
            String addresses = ( config.addresses().get() == null )
                               ? "localhost:11211"
                               : config.addresses().get();
            Protocol protocol = ( config.protocol().get() == null )
                                ? Protocol.TEXT
                                : Protocol.valueOf( config.protocol().get().toUpperCase() );
            String username = config.username().get();
            String password = config.password().get();
            String authMech = config.authMechanism().get() == null
View Full Code Here

Examples of net.windwards.dnsfrontend.api.Protocol

                'b', 'a', 'r' // domain moniker
        };

        TestingConfiguration conf = new TestingConfiguration("bar", "example.com.", 12345);

        Protocol protocol = new BinaryBackendProtocol();
        Record result = protocol.decode(ipv4message, conf);
        ARecord rec = (ARecord) result;
        Assert.assertEquals("foo.example.com.", rec.getName().toString());
        Assert.assertEquals("192.168.0.1", rec.getAddress().getHostAddress());
        Assert.assertEquals(12345, rec.getTTL());
    }
View Full Code Here

Examples of org.apache.avro.Protocol

   * href="http://paranamer.codehaus.org/">Paranamer</a> is run over compiled
   * interface declarations, since Java 6 reflection does not provide access to
   * method parameter names.  See Avro's build.xml for an example. */
  @Override
  public Protocol getProtocol(Class iface) {
    Protocol protocol =
      new Protocol(iface.getSimpleName(),
                   iface.getPackage()==null?"":iface.getPackage().getName());
    Map<String,Schema> names = new LinkedHashMap<String,Schema>();
    Map<String,Message> messages = protocol.getMessages();
    for (Method method : iface.getMethods())
      if ((method.getModifiers() & Modifier.STATIC) == 0) {
        String name = method.getName();
        if (messages.containsKey(name))
          throw new AvroTypeException("Two methods with same name: "+name);
        messages.put(name, getMessage(method, protocol, names));
      }

    // reverse types, since they were defined in reference order
    List<Schema> types = new ArrayList<Schema>();
    types.addAll(names.values());
    Collections.reverse(types);
    protocol.setTypes(types);

    return protocol;
  }
View Full Code Here

Examples of org.apache.avro.Protocol

    assertEquals(3, count);
  }
 
  @Test
  public void testProtocolWithDocs() throws IOException {
    Protocol protocol = TestProtocolParsing.getSimpleProtocol();
    Collection<OutputFile> out = new SpecificCompiler(protocol).compile();
    assertEquals(5, out.size());
    int count = 0;
    for (OutputFile o : out) {
      if (o.path.endsWith("Simple.java")) {
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.