1 18 package org.apache.activemq.jaas.ldap; 19 20 import java.net.InetAddress ; 21 22 import org.apache.ldap.server.configuration.ConfigurationException; 23 import org.apache.ldap.server.configuration.StartupConfiguration; 24 import org.apache.mina.registry.ServiceRegistry; 25 import org.apache.mina.registry.SimpleServiceRegistry; 26 27 32 public class ServerStartupConfiguration extends StartupConfiguration { 33 private static final long serialVersionUID = -7138616822614155454L; 34 35 private boolean enableNetworking = true; 36 private ServiceRegistry minaServiceRegistry = new SimpleServiceRegistry(); 37 private int ldapPort = 389; 38 private int ldapsPort = 636; 39 private InetAddress host = null; 40 private boolean enableKerberos; 41 42 protected ServerStartupConfiguration() { 43 } 44 45 protected InetAddress getHost() { 46 return host; 47 } 48 49 protected void setHost(InetAddress host) { 50 this.host = host; 51 } 52 53 56 public boolean isEnableNetworking() { 57 return enableNetworking; 58 } 59 60 63 public void setEnableNetworking(boolean enableNetworking) { 64 this.enableNetworking = enableNetworking; 65 } 66 67 70 public boolean isEnableKerberos() { 71 return enableKerberos; 72 } 73 74 77 protected void setEnableKerberos(boolean enableKerberos) { 78 this.enableKerberos = enableKerberos; 79 } 80 81 84 public int getLdapPort() { 85 return ldapPort; 86 } 87 88 91 protected void setLdapPort(int ldapPort) { 92 this.ldapPort = ldapPort; 93 } 94 95 98 public int getLdapsPort() { 99 return ldapsPort; 100 } 101 102 105 protected void setLdapsPort(int ldapsPort) { 106 this.ldapsPort = ldapsPort; 107 } 108 109 113 public ServiceRegistry getMinaServiceRegistry() { 114 return minaServiceRegistry; 115 } 116 117 121 protected void setMinaServiceRegistry(ServiceRegistry minaServiceRegistry) { 122 if (minaServiceRegistry == null) { 123 throw new ConfigurationException("MinaServiceRegistry cannot be null"); 124 } 125 this.minaServiceRegistry = minaServiceRegistry; 126 } 127 } 128 | Popular Tags |