if (o == null)
return socketFactory;
if (o instanceof SocketCreationListener)
{
SocketCreationListener listener = (SocketCreationListener) o;
return new CreationListenerSocketFactory(socketFactory, listener);
}
else if (o instanceof String)
{
try
{
Class c = ClassLoaderUtility.loadClass((String) o, AbstractInvoker.class);
SocketCreationListener listener = (SocketCreationListener) c.newInstance();
return new CreationListenerSocketFactory(socketFactory, listener);
}
catch (Exception e)
{
log.error("unable to instantiate class: " + o, e);