1 17 package org.apache.geronimo.directory; 18 19 import java.net.InetAddress ; 20 21 import org.apache.ldap.server.configuration.ConfigurationException; 22 import org.apache.ldap.server.configuration.StartupConfiguration; 23 import org.apache.mina.registry.ServiceRegistry; 24 import org.apache.mina.registry.SimpleServiceRegistry; 25 26 31 public class ServerStartupConfiguration extends StartupConfiguration 32 { 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 46 protected InetAddress getHost() { 47 return host; 48 } 49 50 protected void setHost(InetAddress host) { 51 this.host = host; 52 } 53 54 57 public boolean isEnableNetworking() 58 { 59 return enableNetworking; 60 } 61 62 65 public void setEnableNetworking( boolean enableNetworking ) 66 { 67 this.enableNetworking = enableNetworking; 68 } 69 70 73 public boolean isEnableKerberos() 74 { 75 return enableKerberos; 76 } 77 78 81 protected void setEnableKerberos( boolean enableKerberos ) 82 { 83 this.enableKerberos = enableKerberos; 84 } 85 86 89 public int getLdapPort() 90 { 91 return ldapPort; 92 } 93 94 97 protected void setLdapPort( int ldapPort ) 98 { 99 this.ldapPort = ldapPort; 100 } 101 102 105 public int getLdapsPort() 106 { 107 return ldapsPort; 108 } 109 110 113 protected void setLdapsPort( int ldapsPort ) 114 { 115 this.ldapsPort = ldapsPort; 116 } 117 118 122 public ServiceRegistry getMinaServiceRegistry() 123 { 124 return minaServiceRegistry; 125 } 126 127 131 protected void setMinaServiceRegistry( ServiceRegistry minaServiceRegistry ) 132 { 133 if( minaServiceRegistry == null ) 134 { 135 throw new ConfigurationException( "MinaServiceRegistry cannot be null" ); 136 } 137 this.minaServiceRegistry = minaServiceRegistry; 138 } 139 } | Popular Tags |