Package javax.net

Examples of javax.net.SocketFactory


      // Create client.
      InvokerLocator clientLocator = new InvokerLocator(locatorURI);
      HashMap clientConfig = new HashMap();
      clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
      clientConfig.put(SocketWrapper.WRITE_TIMEOUT, "1000");
      SocketFactory sf = (SocketFactory) getSocketFactoryConstructor().newInstance(new Object[]{new Integer(5000), new Integer(1)});
      clientConfig.put(Remoting.CUSTOM_SOCKET_FACTORY, sf);
      addExtraClientConfig(clientConfig);
      Client client = new Client(clientLocator, clientConfig);
      client.connect();
      log.info("client is connected");
View Full Code Here


      HashMap clientConfig = new HashMap();
      clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
      clientConfig.put(SocketWrapper.WRITE_TIMEOUT, "1000");
      if (isBisocket(getTransport()))
      {
         SocketFactory sf = (SocketFactory) getSocketFactoryConstructor().newInstance(new Object[]{new Integer(5000), new Integer(1)});
         clientConfig.put(Remoting.CUSTOM_SOCKET_FACTORY, sf);
      }
      else
      {
         ServerSocketFactory ssf = (ServerSocketFactory) getServerSocketFactoryConstructor().newInstance(new Object[]{new Integer(5000), new Integer(-1)});
View Full Code Here

         config.put(Remoting.CUSTOM_SERVER_SOCKET_FACTORY, ssf);
      }
      if (setCallbackWriteTimeout)
      {
         config.put(SocketWrapper.WRITE_TIMEOUT, writeTimeout);
         SocketFactory sf = (SocketFactory) getSocketFactoryConstructor().newInstance(new Object[]{new Integer(blockingTime), new Integer(initialWrites)});
         config.put(Remoting.CUSTOM_SOCKET_FACTORY, sf);
      }
      if (callbackTest)
      {
         config.put("numberOfCallRetries", "1");
View Full Code Here

   /**
    * @see org.jboss.remoting.security.SSLSocketBuilderMBean#createSSLSocketFactory(org.jboss.remoting.security.CustomSSLSocketFactory)
    */
   public SocketFactory createSSLSocketFactory(CustomSSLSocketFactory wrapper) throws IOException
   {
      SocketFactory sf = null;

      if (getUseSSLSocketFactory())
      {
         String defaultFactoryName = System.getProperty(REMOTING_DEFAULT_SOCKET_FACTORY_CLASS);
         if (defaultFactoryName != null)
View Full Code Here

      {
         createSocketFactorySSLContext();
         initializeSocketFactorySSLContext();
      }

      SocketFactory sf = sslContextSocketFactory.getSocketFactory();

      wrapper.setFactory((SSLSocketFactory) sf);

      return wrapper;
   }
View Full Code Here

      }
   }

   protected SocketFactory createSocketFactory(Map configuration)
   {
      SocketFactory sf = super.createSocketFactory(configuration);

      if (isCompleteSocketFactory(sf))
      {
         return sf;
      }

      SocketFactory wrapper = sf;

      try
      {
         SSLSocketBuilder server = new SSLSocketBuilder(configuration);
         sf = server.createSSLSocketFactory();
View Full Code Here

   }


   protected Socket createSocket(String address, int port, int timeout) throws IOException
   {
      SocketFactory sf = getSocketFactory();

      if (sf == null)
         sf = createSocketFactory(configuration);

      Socket s = sf.createSocket();

      s.setReuseAddress(getReuseAddress());
      InetSocketAddress inetAddr = new InetSocketAddress(address, port);
     
      if (timeout < 0)
View Full Code Here


   public SocketFactory retrieveSocketFactory(ComparableHolder holder)
      throws IOException
   {
      SocketFactory sf = (SocketFactory) socketFactories.get(this);
      if (sf == null)
      {
         // We want to keep the local configuration map, which might contain a
         // SocketFactory, separate from the configuration map, which is meant
         // to contain only serializable objects.
View Full Code Here

   }


   public SocketFactory retrieveSocketFactory(ComparableHolder holder) throws IOException
   {
      SocketFactory sf = (SocketFactory) socketFactories.get(this);
      if (sf == null)
      {
         try
         {
            // We want to keep the local configuration map, which might contain a
View Full Code Here


   protected Socket createSocket(String address, int port, int timeout) throws IOException
   {
      Socket s = null;
      SocketFactory socketFactory = getSocketFactory();
      if (socketFactory != null)
      {
         s = socketFactory.createSocket();
      }
      else
      {
          s = new Socket();
      }
View Full Code Here

TOP

Related Classes of javax.net.SocketFactory

Copyright © 2018 www.massapicom. 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.