Configure ServerSocketFactories client-side
This topic has not yet been written. The content below is from the topic description.
For ServerSocketFactorys in callback server invokers, there are eight options for programmatic configuration, which are identical to options 1-3, 5 and 7-10 on the server side (we don't assume the existence of an MBeanServer on the client side: Get the ServerInvoker by calling Connector.getServerInvoker() and call ServerInvoker.setServerSocketFactory(). Call Connector.setServerSocketFactory(). Put a constructed ServerSocketFactory in a configuration map, using key Remoting.CUSTOM_SERVER_SOCKET_FACTORY, and pass the map to one of the Connector constructors. Create an xml document with root element , setting the attribute to the class name of a ServerSocketFactory and pass the document to Connector.setConfiguration(). For example: StringBuffer buf = new StringBuffer(); buf.append("\n"); buf.append(""); buf.append(" "); buf.append(" " + getHostName() + ""); buf.append(" " + freeport + ""); buf.append(" " + serverSocketFactoryClassname + ""); buf.append(" "); buf.append(""); ByteArrayInputStream bais = new ByteArrayInputStream(buf.toString().getBytes()); Document xml = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(bais); connector.setConfiguration(xml.getDocumentElement()); The ServerSocketFactory class must have a default constructor, which will be used to create a ServerSocketFactory. Put the class name of a ServerSocketFactory in a configuration map, using key ServerInvoker.SERVER_SOCKET_FACTORY, and pass the map to one of the Connector constructors. The ServerSocketFactory class must have a default constructor, which will be used to create a ServerSocketFactory. Put a set of SSL parameters, using the keys in org.jboss.remoting.security.SSLSocketBuilder, in a configuration map and pass the map to one of the Connector constructors. These will be used by SSLSocketBuilder (see below) to create a CustomSSLServerSocketFactory. Configure an appropriate set of SSL system properties and use one of the SSL transports (https, sslrmi, or sslsocket). The properties will be used to create some kind of SSLServerSocketFactory, as determined by the transport. Use one of the non-SSL transports and do nothing. A default ServerSocketFactory will be constructed. These options are essentially in descending order of precedence. For example, if options 3 and 5, for example, are both used, the factory passed in options 3 will prevail. Options 1, 2, 3, 4, and 5 are illustrated in FactoryConfigSample and options 6 and 7 are illustrated in FactoryConfigSSLSample, both of which are in package org.jboss.remoting.samples.config.factories. Timing considerations. See the discussion in the section on the creation of server socket factories on the server side.