Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jboss.remoting.security;
 
This is a basic wrapper around the SSLSocketBuilder which is needed because it extneds the javax.net.ServerSocketFactory class and implements the SSLServerSocketFactoryServiceMBean. It has no other function.

Author(s):
Tom Elrod
   {
      super();
   }

   
Constructor for CustomSSLSocketFactory. The factory can be null - call CustomSSLSocketFactory.setFactory(javax.net.ssl.SSLSocketFactory) to set it later.

Parameters:
factory the true factory this class delegates to
builder the class that built this custom factory - contains all the configuration for this factory
   {
      super(factorybuilder);
   }

   
start the service, create is already called
   public void start() throws Exception
   {
      if(getSSLSocketBuilder() != null)
      {
         SocketFactory socketFactory = getSSLSocketBuilder().createSSLSocketFactory();
         if(socketFactory instanceof SSLSocketFactory)
         {
            setFactory((SSLSocketFactory)socketFactory);
         }
         else
         {
            throw new Exception("Can not start SSLSocketFactoryService because socket factory produced does not support SSL.");
         }
      }
      else
      {
         throw new Exception("Can not create socket factory due to the SSLSocketBuilder not being set.");
      }
   }

   
create the service, do expensive operations etc
   public void create() throws Exception
   {
      //NOOP
   }

   
stop the service
   public void stop()
   {
      //NOOP
   }

   
destroy the service, tear down
   public void destroy()
   {
      //NOOP
   }
New to GrepCode? Check out our FAQ X