1 45 package org.exolab.jms.server.net; 46 47 import org.exolab.jms.config.Configuration; 48 import org.exolab.jms.config.SocketConfigurationType; 49 import org.exolab.jms.config.types.SchemeType; 50 import org.exolab.jms.net.socket.SocketRequestInfo; 51 import org.exolab.jms.net.uri.URI; 52 import org.exolab.jms.net.util.Properties; 53 54 55 61 abstract class SocketConnectorCfg extends AbstractConnectorCfg { 62 63 66 private SocketConfigurationType _config; 67 68 69 76 public SocketConnectorCfg(SchemeType scheme, Configuration config, 77 SocketConfigurationType socketConfig) { 78 super(scheme, config); 79 if (socketConfig == null) { 80 throw new IllegalArgumentException ( 81 "Argument 'socketConfig' is null"); 82 } 83 _config = socketConfig; 84 } 85 86 91 protected void populateAcceptProperties(Properties properties) { 92 URI uri = getURI(getExportURI()); 93 SocketRequestInfo info = new SocketRequestInfo(uri); 94 populateRequestInfo(info); 95 info.export(properties); 96 } 97 98 103 protected void populateRequestInfo(SocketRequestInfo info) { 104 info.setBindAll(_config.getBindAll()); 105 info.setMaxThreads(_config.getMaxThreads()); 106 } 107 108 113 protected SocketConfigurationType getSocketConfiguration() { 114 return _config; 115 } 116 117 } 118 | Popular Tags |