Examples of Protocol


Examples of org.apache.commons.httpclient.protocol.Protocol

    public synchronized void setHost(String host, int port, String scheme) {
        setHost(new HttpHost(host, port, keepProtocol(host, port, scheme)));
    }

    protected Protocol keepProtocol(String host, int port, String scheme) {
        final Protocol oldProtocol = getProtocol();
        if (oldProtocol != null) {
            final String oldScheme = oldProtocol.getScheme();
            if (oldScheme == scheme || (oldScheme != null && oldScheme.equalsIgnoreCase(scheme))) {
                return oldProtocol;
            }
        }
        return Protocol.getProtocol(scheme);
View Full Code Here

Examples of org.apache.cxf.fediz.core.config.Protocol

            ByteArrayOutputStream bout = new ByteArrayOutputStream(4096);
            Writer streamWriter = new OutputStreamWriter(bout);
            XMLStreamWriter writer = factory.createXMLStreamWriter(streamWriter);

            Protocol protocol = config.getProtocol();

            writer.writeStartDocument();

            String referenceID = "_" + UUIDGenerator.getUUID();
            writer.writeStartElement("", "EntityDescriptor", SAML2_METADATA_NS);
View Full Code Here

Examples of org.apache.droids.api.Protocol

   *                the string that contains the protocol
   * @return ready to use protocol plugin or null if non have been found
   * @throws ProtocolNotFoundException
   */
  public Protocol getProtocol(URI uri) throws ProtocolNotFoundException {
    Protocol protocol = null;
    try {
      String protocolName = uri.getScheme();
      if (protocolName == null) {
        throw new ProtocolNotFoundException(uri);
      }
View Full Code Here

Examples of org.apache.geronimo.network.protocol.Protocol

        try {
            protocol = newProtocol();
        } catch (ProtocolException e) {
            throw new NodeException("Can not create protocol", e);
        }
        Protocol curProtocol = protocol;
        while ( null != curProtocol ) {
            if ( curProtocol instanceof CallbackSocketProtocol ) {
                ((CallbackSocketProtocol) curProtocol).setListener(
                    new SocketProtocolListener() {
                        public void onClose() {
                            msgOut = null;
                            inDispatcher = null;
                            if ( null != listener ) {
                                listener.onClose();
                            }
                        }
                    });
                break;
            }
            curProtocol = curProtocol.getDownProtocol();
        }
        if ( false == curProtocol instanceof CallbackSocketProtocol ) {
            throw new AssertionError("No CallbackSocketProtocol.");
        }
       
View Full Code Here

Examples of org.apache.james.protocols.api.Protocol

        TestMessageHook hook = new TestMessageHook();
        InetSocketAddress address = new InetSocketAddress("127.0.0.1", TestUtils.getFreePort());
       
        NettyServer server = null;
        try {
            Protocol protocol = createProtocol(hook);
            ((SMTPConfigurationImpl) protocol.getConfiguration()).setUseAddressBracketsEnforcement(false);
            server = new NettyServer(protocol);
            server.setListenAddresses(address);
            server.bind();
           
            SMTPClient client = createClient();
View Full Code Here

Examples of org.apache.logging.log4j.core.net.Protocol

        if (name == null) {
            LOGGER.error("No name provided for SyslogAppender");
            return null;
        }
        final String prot = protocol != null ? protocol : Protocol.UDP.name();
        final Protocol p = EnglishEnums.valueOf(Protocol.class, protocol);
        final AbstractSocketManager manager = createSocketManager(p, host, port, reconnectDelay, fail, layout);
        if (manager == null) {
            return null;
        }
View Full Code Here

Examples of org.apache.mailreaderjpa.Protocol

            // Start a transaction since we will be updating the database
            et = em.getTransaction();
            et.begin();

            // Create the basic protocol data
            Protocol protocol1 = null;
            protocol1 = new Protocol();
            protocol1.setDescription("IMAP Protocol");
            em.persist(protocol1);
            Protocol protocol2 = new Protocol();
            protocol2.setDescription("POP3 Protocol");
            em.persist(protocol2);

            // Set up the initial user and subscriptions
            User user = new User();
            user.setUsername("user");
View Full Code Here

Examples of org.apache.nutch.protocol.Protocol

  }

  public void testIt() throws ProtocolException, ParseException {

    String urlString;
    Protocol protocol;
    Content content;
    Parse parse;

    Configuration conf = NutchConfiguration.create();
    ParseUtil parser = new ParseUtil(conf);
    ProtocolFactory factory = new ProtocolFactory(conf);
    for (int i = 0; i < sampleFiles.length; i++) {
      urlString = "file:" + sampleDir + fileSeparator + sampleFiles[i];

      protocol = factory.getProtocol(urlString);
      content = protocol.getProtocolOutput(new Text(urlString),
                                           new CrawlDatum()).getContent();
      parse = parser.parseByExtensionId("parse-msexcel", content).get(content.getUrl());

      assertTrue(parse.getText().equals(expectedText));
    }
View Full Code Here

Examples of org.apache.oodt.cas.protocol.Protocol

        }
    }

    Protocol getNextAvaliableSession(RemoteSiteFile file) throws CrawlerException {
        // wait for available session, then load it
        Protocol session;
        while ((session = getSession(file)) == null) {
            try {
                waitMainThread();
            } catch (InterruptedException e1) {
            }
View Full Code Here

Examples of org.apache.oodt.cas.pushpull.protocol.Protocol

     */
    public Protocol getAppropriateProtocol(ProtocolFile pFile,
            boolean allowReuse, boolean navigateToPathLoc)
            throws RemoteConnectionException {
        try {
            Protocol protocol = getAppropriateProtocol(pFile, allowReuse);
            if (protocol != null && navigateToPathLoc) {
                if (pFile.isDirectory())
                    this.cd(protocol, pFile);
                else
                    this.cd(protocol, pFile.getParentFile());
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.