001/*
002 * CDDL HEADER START
003 *
004 * The contents of this file are subject to the terms of the
005 * Common Development and Distribution License, Version 1.0 only
006 * (the "License").  You may not use this file except in compliance
007 * with the License.
008 *
009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
010 * or http://forgerock.org/license/CDDLv1.0.html.
011 * See the License for the specific language governing permissions
012 * and limitations under the License.
013 *
014 * When distributing Covered Code, include this CDDL HEADER in each
015 * file and include the License file at legal-notices/CDDLv1_0.txt.
016 * If applicable, add the following below this CDDL HEADER, with the
017 * fields enclosed by brackets "[]" replaced with your own identifying
018 * information:
019 *      Portions Copyright [yyyy] [name of copyright owner]
020 *
021 * CDDL HEADER END
022 *
023 *
024 *      Copyright 2008 Sun Microsystems, Inc.
025 */
026package org.opends.server.admin.std.meta;
027
028
029
030import java.net.InetAddress;
031import java.util.Collection;
032import java.util.SortedSet;
033import org.forgerock.opendj.ldap.AddressMask;
034import org.opends.server.admin.AdministratorAction;
035import org.opends.server.admin.AggregationPropertyDefinition;
036import org.opends.server.admin.AliasDefaultBehaviorProvider;
037import org.opends.server.admin.BooleanPropertyDefinition;
038import org.opends.server.admin.ClassPropertyDefinition;
039import org.opends.server.admin.client.AuthorizationException;
040import org.opends.server.admin.client.CommunicationException;
041import org.opends.server.admin.client.ConcurrentModificationException;
042import org.opends.server.admin.client.ManagedObject;
043import org.opends.server.admin.client.MissingMandatoryPropertiesException;
044import org.opends.server.admin.client.OperationRejectedException;
045import org.opends.server.admin.condition.Conditions;
046import org.opends.server.admin.DefaultBehaviorProvider;
047import org.opends.server.admin.DefinedDefaultBehaviorProvider;
048import org.opends.server.admin.GenericConstraint;
049import org.opends.server.admin.IntegerPropertyDefinition;
050import org.opends.server.admin.IPAddressMaskPropertyDefinition;
051import org.opends.server.admin.IPAddressPropertyDefinition;
052import org.opends.server.admin.ManagedObjectAlreadyExistsException;
053import org.opends.server.admin.ManagedObjectDefinition;
054import org.opends.server.admin.PropertyOption;
055import org.opends.server.admin.PropertyProvider;
056import org.opends.server.admin.server.ConfigurationChangeListener;
057import org.opends.server.admin.server.ServerManagedObject;
058import org.opends.server.admin.std.client.JMXConnectionHandlerCfgClient;
059import org.opends.server.admin.std.client.KeyManagerProviderCfgClient;
060import org.opends.server.admin.std.server.ConnectionHandlerCfg;
061import org.opends.server.admin.std.server.JMXConnectionHandlerCfg;
062import org.opends.server.admin.std.server.KeyManagerProviderCfg;
063import org.opends.server.admin.StringPropertyDefinition;
064import org.opends.server.admin.Tag;
065import org.opends.server.admin.UndefinedDefaultBehaviorProvider;
066import org.opends.server.types.DN;
067
068
069
070/**
071 * An interface for querying the JMX Connection Handler managed object
072 * definition meta information.
073 * <p>
074 * The JMX Connection Handler is used to interact with clients using
075 * the Java Management Extensions (JMX) protocol.
076 */
077public final class JMXConnectionHandlerCfgDefn extends ManagedObjectDefinition<JMXConnectionHandlerCfgClient, JMXConnectionHandlerCfg> {
078
079  // The singleton configuration definition instance.
080  private static final JMXConnectionHandlerCfgDefn INSTANCE = new JMXConnectionHandlerCfgDefn();
081
082
083
084  // The "java-class" property definition.
085  private static final ClassPropertyDefinition PD_JAVA_CLASS;
086
087
088
089  // The "key-manager-provider" property definition.
090  private static final AggregationPropertyDefinition<KeyManagerProviderCfgClient, KeyManagerProviderCfg> PD_KEY_MANAGER_PROVIDER;
091
092
093
094  // The "listen-address" property definition.
095  private static final IPAddressPropertyDefinition PD_LISTEN_ADDRESS;
096
097
098
099  // The "listen-port" property definition.
100  private static final IntegerPropertyDefinition PD_LISTEN_PORT;
101
102
103
104  // The "rmi-port" property definition.
105  private static final IntegerPropertyDefinition PD_RMI_PORT;
106
107
108
109  // The "ssl-cert-nickname" property definition.
110  private static final StringPropertyDefinition PD_SSL_CERT_NICKNAME;
111
112
113
114  // The "use-ssl" property definition.
115  private static final BooleanPropertyDefinition PD_USE_SSL;
116
117
118
119  // Build the "java-class" property definition.
120  static {
121      ClassPropertyDefinition.Builder builder = ClassPropertyDefinition.createBuilder(INSTANCE, "java-class");
122      builder.setOption(PropertyOption.MANDATORY);
123      builder.setOption(PropertyOption.ADVANCED);
124      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "java-class"));
125      DefaultBehaviorProvider<String> provider = new DefinedDefaultBehaviorProvider<String>("org.opends.server.protocols.jmx.JmxConnectionHandler");
126      builder.setDefaultBehaviorProvider(provider);
127      builder.addInstanceOf("org.opends.server.api.ConnectionHandler");
128      PD_JAVA_CLASS = builder.getInstance();
129      INSTANCE.registerPropertyDefinition(PD_JAVA_CLASS);
130  }
131
132
133
134  // Build the "key-manager-provider" property definition.
135  static {
136      AggregationPropertyDefinition.Builder<KeyManagerProviderCfgClient, KeyManagerProviderCfg> builder = AggregationPropertyDefinition.createBuilder(INSTANCE, "key-manager-provider");
137      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.NONE, INSTANCE, "key-manager-provider"));
138      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<String>());
139      builder.setParentPath("/");
140      builder.setRelationDefinition("key-manager-provider");
141      builder.setTargetNeedsEnablingCondition(Conditions.and(Conditions.contains("enabled", "true"), Conditions.contains("use-ssl", "true")));
142      builder.setTargetIsEnabledCondition(Conditions.contains("enabled", "true"));
143      PD_KEY_MANAGER_PROVIDER = builder.getInstance();
144      INSTANCE.registerPropertyDefinition(PD_KEY_MANAGER_PROVIDER);
145      INSTANCE.registerConstraint(PD_KEY_MANAGER_PROVIDER.getSourceConstraint());
146  }
147
148
149
150  // Build the "listen-address" property definition.
151  static {
152      IPAddressPropertyDefinition.Builder builder = IPAddressPropertyDefinition.createBuilder(INSTANCE, "listen-address");
153      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.SERVER_RESTART, INSTANCE, "listen-address"));
154      DefaultBehaviorProvider<InetAddress> provider = new DefinedDefaultBehaviorProvider<InetAddress>("0.0.0.0");
155      builder.setDefaultBehaviorProvider(provider);
156      PD_LISTEN_ADDRESS = builder.getInstance();
157      INSTANCE.registerPropertyDefinition(PD_LISTEN_ADDRESS);
158  }
159
160
161
162  // Build the "listen-port" property definition.
163  static {
164      IntegerPropertyDefinition.Builder builder = IntegerPropertyDefinition.createBuilder(INSTANCE, "listen-port");
165      builder.setOption(PropertyOption.MANDATORY);
166      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "listen-port"));
167      builder.setDefaultBehaviorProvider(new UndefinedDefaultBehaviorProvider<Integer>());
168      builder.setUpperLimit(65535);
169      builder.setLowerLimit(1);
170      PD_LISTEN_PORT = builder.getInstance();
171      INSTANCE.registerPropertyDefinition(PD_LISTEN_PORT);
172  }
173
174
175
176  // Build the "rmi-port" property definition.
177  static {
178      IntegerPropertyDefinition.Builder builder = IntegerPropertyDefinition.createBuilder(INSTANCE, "rmi-port");
179      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "rmi-port"));
180      DefaultBehaviorProvider<Integer> provider = new DefinedDefaultBehaviorProvider<Integer>("0");
181      builder.setDefaultBehaviorProvider(provider);
182      builder.setUpperLimit(65535);
183      builder.setLowerLimit(0);
184      PD_RMI_PORT = builder.getInstance();
185      INSTANCE.registerPropertyDefinition(PD_RMI_PORT);
186  }
187
188
189
190  // Build the "ssl-cert-nickname" property definition.
191  static {
192      StringPropertyDefinition.Builder builder = StringPropertyDefinition.createBuilder(INSTANCE, "ssl-cert-nickname");
193      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "ssl-cert-nickname"));
194      builder.setDefaultBehaviorProvider(new AliasDefaultBehaviorProvider<String>(INSTANCE, "ssl-cert-nickname"));
195      PD_SSL_CERT_NICKNAME = builder.getInstance();
196      INSTANCE.registerPropertyDefinition(PD_SSL_CERT_NICKNAME);
197  }
198
199
200
201  // Build the "use-ssl" property definition.
202  static {
203      BooleanPropertyDefinition.Builder builder = BooleanPropertyDefinition.createBuilder(INSTANCE, "use-ssl");
204      builder.setAdministratorAction(new AdministratorAction(AdministratorAction.Type.COMPONENT_RESTART, INSTANCE, "use-ssl"));
205      DefaultBehaviorProvider<Boolean> provider = new DefinedDefaultBehaviorProvider<Boolean>("false");
206      builder.setDefaultBehaviorProvider(provider);
207      PD_USE_SSL = builder.getInstance();
208      INSTANCE.registerPropertyDefinition(PD_USE_SSL);
209  }
210
211
212
213  // Register the tags associated with this managed object definition.
214  static {
215    INSTANCE.registerTag(Tag.valueOf("core-server"));
216  }
217
218
219
220  // Register the constraints associated with this managed object definition.
221  static {
222    INSTANCE.registerConstraint(new GenericConstraint(INSTANCE, 1, Conditions.implies(Conditions.contains("enabled", "true"), Conditions.implies(Conditions.contains("use-ssl", "true"), Conditions.isPresent("key-manager-provider")))));
223  }
224
225
226
227  /**
228   * Get the JMX Connection Handler configuration definition
229   * singleton.
230   *
231   * @return Returns the JMX Connection Handler configuration
232   *         definition singleton.
233   */
234  public static JMXConnectionHandlerCfgDefn getInstance() {
235    return INSTANCE;
236  }
237
238
239
240  /**
241   * Private constructor.
242   */
243  private JMXConnectionHandlerCfgDefn() {
244    super("jmx-connection-handler", ConnectionHandlerCfgDefn.getInstance());
245  }
246
247
248
249  /**
250   * {@inheritDoc}
251   */
252  public JMXConnectionHandlerCfgClient createClientConfiguration(
253      ManagedObject<? extends JMXConnectionHandlerCfgClient> impl) {
254    return new JMXConnectionHandlerCfgClientImpl(impl);
255  }
256
257
258
259  /**
260   * {@inheritDoc}
261   */
262  public JMXConnectionHandlerCfg createServerConfiguration(
263      ServerManagedObject<? extends JMXConnectionHandlerCfg> impl) {
264    return new JMXConnectionHandlerCfgServerImpl(impl);
265  }
266
267
268
269  /**
270   * {@inheritDoc}
271   */
272  public Class<JMXConnectionHandlerCfg> getServerConfigurationClass() {
273    return JMXConnectionHandlerCfg.class;
274  }
275
276
277
278  /**
279   * Get the "allowed-client" property definition.
280   * <p>
281   * Specifies a set of host names or address masks that determine the
282   * clients that are allowed to establish connections to this JMX
283   * Connection Handler.
284   * <p>
285   * Valid values include a host name, a fully qualified domain name,
286   * a domain name, an IP address, or a subnetwork with subnetwork
287   * mask.
288   *
289   * @return Returns the "allowed-client" property definition.
290   */
291  public IPAddressMaskPropertyDefinition getAllowedClientPropertyDefinition() {
292    return ConnectionHandlerCfgDefn.getInstance().getAllowedClientPropertyDefinition();
293  }
294
295
296
297  /**
298   * Get the "denied-client" property definition.
299   * <p>
300   * Specifies a set of host names or address masks that determine the
301   * clients that are not allowed to establish connections to this JMX
302   * Connection Handler.
303   * <p>
304   * Valid values include a host name, a fully qualified domain name,
305   * a domain name, an IP address, or a subnetwork with subnetwork
306   * mask. If both allowed and denied client masks are defined and a
307   * client connection matches one or more masks in both lists, then
308   * the connection is denied. If only a denied list is specified, then
309   * any client not matching a mask in that list is allowed.
310   *
311   * @return Returns the "denied-client" property definition.
312   */
313  public IPAddressMaskPropertyDefinition getDeniedClientPropertyDefinition() {
314    return ConnectionHandlerCfgDefn.getInstance().getDeniedClientPropertyDefinition();
315  }
316
317
318
319  /**
320   * Get the "enabled" property definition.
321   * <p>
322   * Indicates whether the JMX Connection Handler is enabled.
323   *
324   * @return Returns the "enabled" property definition.
325   */
326  public BooleanPropertyDefinition getEnabledPropertyDefinition() {
327    return ConnectionHandlerCfgDefn.getInstance().getEnabledPropertyDefinition();
328  }
329
330
331
332  /**
333   * Get the "java-class" property definition.
334   * <p>
335   * Specifies the fully-qualified name of the Java class that
336   * provides the JMX Connection Handler implementation.
337   *
338   * @return Returns the "java-class" property definition.
339   */
340  public ClassPropertyDefinition getJavaClassPropertyDefinition() {
341    return PD_JAVA_CLASS;
342  }
343
344
345
346  /**
347   * Get the "key-manager-provider" property definition.
348   * <p>
349   * Specifies the name of the key manager that should be used with
350   * this JMX Connection Handler .
351   *
352   * @return Returns the "key-manager-provider" property definition.
353   */
354  public AggregationPropertyDefinition<KeyManagerProviderCfgClient, KeyManagerProviderCfg> getKeyManagerProviderPropertyDefinition() {
355    return PD_KEY_MANAGER_PROVIDER;
356  }
357
358
359
360  /**
361   * Get the "listen-address" property definition.
362   * <p>
363   * Specifies the address on which this JMX Connection Handler should
364   * listen for connections from JMX clients.
365   * <p>
366   * If no value is provided, then the JMX Connection Handler listens
367   * on all interfaces.
368   *
369   * @return Returns the "listen-address" property definition.
370   */
371  public IPAddressPropertyDefinition getListenAddressPropertyDefinition() {
372    return PD_LISTEN_ADDRESS;
373  }
374
375
376
377  /**
378   * Get the "listen-port" property definition.
379   * <p>
380   * Specifies the port number on which the JMX Connection Handler
381   * will listen for connections from clients.
382   * <p>
383   * Only a single port number may be provided.
384   *
385   * @return Returns the "listen-port" property definition.
386   */
387  public IntegerPropertyDefinition getListenPortPropertyDefinition() {
388    return PD_LISTEN_PORT;
389  }
390
391
392
393  /**
394   * Get the "rmi-port" property definition.
395   * <p>
396   * Specifies the port number on which the JMX RMI service will
397   * listen for connections from clients. A value of 0 indicates the
398   * service to choose a port of its own.
399   * <p>
400   * If the value provided is different than 0, the value will be used
401   * as the RMI port. Otherwise, the RMI service will choose a port of
402   * its own.
403   *
404   * @return Returns the "rmi-port" property definition.
405   */
406  public IntegerPropertyDefinition getRmiPortPropertyDefinition() {
407    return PD_RMI_PORT;
408  }
409
410
411
412  /**
413   * Get the "ssl-cert-nickname" property definition.
414   * <p>
415   * Specifies the nickname (also called the alias) of the certificate
416   * that the JMX Connection Handler should use when performing SSL
417   * communication.
418   * <p>
419   * This is only applicable when the JMX Connection Handler is
420   * configured to use SSL.
421   *
422   * @return Returns the "ssl-cert-nickname" property definition.
423   */
424  public StringPropertyDefinition getSSLCertNicknamePropertyDefinition() {
425    return PD_SSL_CERT_NICKNAME;
426  }
427
428
429
430  /**
431   * Get the "use-ssl" property definition.
432   * <p>
433   * Indicates whether the JMX Connection Handler should use SSL.
434   * <p>
435   * If enabled, the JMX Connection Handler will use SSL to encrypt
436   * communication with the clients.
437   *
438   * @return Returns the "use-ssl" property definition.
439   */
440  public BooleanPropertyDefinition getUseSSLPropertyDefinition() {
441    return PD_USE_SSL;
442  }
443
444
445
446  /**
447   * Managed object client implementation.
448   */
449  private static class JMXConnectionHandlerCfgClientImpl implements
450    JMXConnectionHandlerCfgClient {
451
452    // Private implementation.
453    private ManagedObject<? extends JMXConnectionHandlerCfgClient> impl;
454
455
456
457    // Private constructor.
458    private JMXConnectionHandlerCfgClientImpl(
459        ManagedObject<? extends JMXConnectionHandlerCfgClient> impl) {
460      this.impl = impl;
461    }
462
463
464
465    /**
466     * {@inheritDoc}
467     */
468    public SortedSet<AddressMask> getAllowedClient() {
469      return impl.getPropertyValues(INSTANCE.getAllowedClientPropertyDefinition());
470    }
471
472
473
474    /**
475     * {@inheritDoc}
476     */
477    public void setAllowedClient(Collection<AddressMask> values) {
478      impl.setPropertyValues(INSTANCE.getAllowedClientPropertyDefinition(), values);
479    }
480
481
482
483    /**
484     * {@inheritDoc}
485     */
486    public SortedSet<AddressMask> getDeniedClient() {
487      return impl.getPropertyValues(INSTANCE.getDeniedClientPropertyDefinition());
488    }
489
490
491
492    /**
493     * {@inheritDoc}
494     */
495    public void setDeniedClient(Collection<AddressMask> values) {
496      impl.setPropertyValues(INSTANCE.getDeniedClientPropertyDefinition(), values);
497    }
498
499
500
501    /**
502     * {@inheritDoc}
503     */
504    public Boolean isEnabled() {
505      return impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition());
506    }
507
508
509
510    /**
511     * {@inheritDoc}
512     */
513    public void setEnabled(boolean value) {
514      impl.setPropertyValue(INSTANCE.getEnabledPropertyDefinition(), value);
515    }
516
517
518
519    /**
520     * {@inheritDoc}
521     */
522    public String getJavaClass() {
523      return impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition());
524    }
525
526
527
528    /**
529     * {@inheritDoc}
530     */
531    public void setJavaClass(String value) {
532      impl.setPropertyValue(INSTANCE.getJavaClassPropertyDefinition(), value);
533    }
534
535
536
537    /**
538     * {@inheritDoc}
539     */
540    public String getKeyManagerProvider() {
541      return impl.getPropertyValue(INSTANCE.getKeyManagerProviderPropertyDefinition());
542    }
543
544
545
546    /**
547     * {@inheritDoc}
548     */
549    public void setKeyManagerProvider(String value) {
550      impl.setPropertyValue(INSTANCE.getKeyManagerProviderPropertyDefinition(), value);
551    }
552
553
554
555    /**
556     * {@inheritDoc}
557     */
558    public InetAddress getListenAddress() {
559      return impl.getPropertyValue(INSTANCE.getListenAddressPropertyDefinition());
560    }
561
562
563
564    /**
565     * {@inheritDoc}
566     */
567    public void setListenAddress(InetAddress value) {
568      impl.setPropertyValue(INSTANCE.getListenAddressPropertyDefinition(), value);
569    }
570
571
572
573    /**
574     * {@inheritDoc}
575     */
576    public Integer getListenPort() {
577      return impl.getPropertyValue(INSTANCE.getListenPortPropertyDefinition());
578    }
579
580
581
582    /**
583     * {@inheritDoc}
584     */
585    public void setListenPort(int value) {
586      impl.setPropertyValue(INSTANCE.getListenPortPropertyDefinition(), value);
587    }
588
589
590
591    /**
592     * {@inheritDoc}
593     */
594    public int getRmiPort() {
595      return impl.getPropertyValue(INSTANCE.getRmiPortPropertyDefinition());
596    }
597
598
599
600    /**
601     * {@inheritDoc}
602     */
603    public void setRmiPort(Integer value) {
604      impl.setPropertyValue(INSTANCE.getRmiPortPropertyDefinition(), value);
605    }
606
607
608
609    /**
610     * {@inheritDoc}
611     */
612    public String getSSLCertNickname() {
613      return impl.getPropertyValue(INSTANCE.getSSLCertNicknamePropertyDefinition());
614    }
615
616
617
618    /**
619     * {@inheritDoc}
620     */
621    public void setSSLCertNickname(String value) {
622      impl.setPropertyValue(INSTANCE.getSSLCertNicknamePropertyDefinition(), value);
623    }
624
625
626
627    /**
628     * {@inheritDoc}
629     */
630    public boolean isUseSSL() {
631      return impl.getPropertyValue(INSTANCE.getUseSSLPropertyDefinition());
632    }
633
634
635
636    /**
637     * {@inheritDoc}
638     */
639    public void setUseSSL(Boolean value) {
640      impl.setPropertyValue(INSTANCE.getUseSSLPropertyDefinition(), value);
641    }
642
643
644
645    /**
646     * {@inheritDoc}
647     */
648    public ManagedObjectDefinition<? extends JMXConnectionHandlerCfgClient, ? extends JMXConnectionHandlerCfg> definition() {
649      return INSTANCE;
650    }
651
652
653
654    /**
655     * {@inheritDoc}
656     */
657    public PropertyProvider properties() {
658      return impl;
659    }
660
661
662
663    /**
664     * {@inheritDoc}
665     */
666    public void commit() throws ManagedObjectAlreadyExistsException,
667        MissingMandatoryPropertiesException, ConcurrentModificationException,
668        OperationRejectedException, AuthorizationException,
669        CommunicationException {
670      impl.commit();
671    }
672
673  }
674
675
676
677  /**
678   * Managed object server implementation.
679   */
680  private static class JMXConnectionHandlerCfgServerImpl implements
681    JMXConnectionHandlerCfg {
682
683    // Private implementation.
684    private ServerManagedObject<? extends JMXConnectionHandlerCfg> impl;
685
686    // The value of the "allowed-client" property.
687    private final SortedSet<AddressMask> pAllowedClient;
688
689    // The value of the "denied-client" property.
690    private final SortedSet<AddressMask> pDeniedClient;
691
692    // The value of the "enabled" property.
693    private final boolean pEnabled;
694
695    // The value of the "java-class" property.
696    private final String pJavaClass;
697
698    // The value of the "key-manager-provider" property.
699    private final String pKeyManagerProvider;
700
701    // The value of the "listen-address" property.
702    private final InetAddress pListenAddress;
703
704    // The value of the "listen-port" property.
705    private final int pListenPort;
706
707    // The value of the "rmi-port" property.
708    private final int pRmiPort;
709
710    // The value of the "ssl-cert-nickname" property.
711    private final String pSSLCertNickname;
712
713    // The value of the "use-ssl" property.
714    private final boolean pUseSSL;
715
716
717
718    // Private constructor.
719    private JMXConnectionHandlerCfgServerImpl(ServerManagedObject<? extends JMXConnectionHandlerCfg> impl) {
720      this.impl = impl;
721      this.pAllowedClient = impl.getPropertyValues(INSTANCE.getAllowedClientPropertyDefinition());
722      this.pDeniedClient = impl.getPropertyValues(INSTANCE.getDeniedClientPropertyDefinition());
723      this.pEnabled = impl.getPropertyValue(INSTANCE.getEnabledPropertyDefinition());
724      this.pJavaClass = impl.getPropertyValue(INSTANCE.getJavaClassPropertyDefinition());
725      this.pKeyManagerProvider = impl.getPropertyValue(INSTANCE.getKeyManagerProviderPropertyDefinition());
726      this.pListenAddress = impl.getPropertyValue(INSTANCE.getListenAddressPropertyDefinition());
727      this.pListenPort = impl.getPropertyValue(INSTANCE.getListenPortPropertyDefinition());
728      this.pRmiPort = impl.getPropertyValue(INSTANCE.getRmiPortPropertyDefinition());
729      this.pSSLCertNickname = impl.getPropertyValue(INSTANCE.getSSLCertNicknamePropertyDefinition());
730      this.pUseSSL = impl.getPropertyValue(INSTANCE.getUseSSLPropertyDefinition());
731    }
732
733
734
735    /**
736     * {@inheritDoc}
737     */
738    public void addJMXChangeListener(
739        ConfigurationChangeListener<JMXConnectionHandlerCfg> listener) {
740      impl.registerChangeListener(listener);
741    }
742
743
744
745    /**
746     * {@inheritDoc}
747     */
748    public void removeJMXChangeListener(
749        ConfigurationChangeListener<JMXConnectionHandlerCfg> listener) {
750      impl.deregisterChangeListener(listener);
751    }
752    /**
753     * {@inheritDoc}
754     */
755    public void addChangeListener(
756        ConfigurationChangeListener<ConnectionHandlerCfg> listener) {
757      impl.registerChangeListener(listener);
758    }
759
760
761
762    /**
763     * {@inheritDoc}
764     */
765    public void removeChangeListener(
766        ConfigurationChangeListener<ConnectionHandlerCfg> listener) {
767      impl.deregisterChangeListener(listener);
768    }
769
770
771
772    /**
773     * {@inheritDoc}
774     */
775    public SortedSet<AddressMask> getAllowedClient() {
776      return pAllowedClient;
777    }
778
779
780
781    /**
782     * {@inheritDoc}
783     */
784    public SortedSet<AddressMask> getDeniedClient() {
785      return pDeniedClient;
786    }
787
788
789
790    /**
791     * {@inheritDoc}
792     */
793    public boolean isEnabled() {
794      return pEnabled;
795    }
796
797
798
799    /**
800     * {@inheritDoc}
801     */
802    public String getJavaClass() {
803      return pJavaClass;
804    }
805
806
807
808    /**
809     * {@inheritDoc}
810     */
811    public String getKeyManagerProvider() {
812      return pKeyManagerProvider;
813    }
814
815
816
817    /**
818     * {@inheritDoc}
819     */
820    public DN getKeyManagerProviderDN() {
821      String value = getKeyManagerProvider();
822      if (value == null) return null;
823      return INSTANCE.getKeyManagerProviderPropertyDefinition().getChildDN(value);
824    }
825
826
827
828    /**
829     * {@inheritDoc}
830     */
831    public InetAddress getListenAddress() {
832      return pListenAddress;
833    }
834
835
836
837    /**
838     * {@inheritDoc}
839     */
840    public int getListenPort() {
841      return pListenPort;
842    }
843
844
845
846    /**
847     * {@inheritDoc}
848     */
849    public int getRmiPort() {
850      return pRmiPort;
851    }
852
853
854
855    /**
856     * {@inheritDoc}
857     */
858    public String getSSLCertNickname() {
859      return pSSLCertNickname;
860    }
861
862
863
864    /**
865     * {@inheritDoc}
866     */
867    public boolean isUseSSL() {
868      return pUseSSL;
869    }
870
871
872
873    /**
874     * {@inheritDoc}
875     */
876    public Class<? extends JMXConnectionHandlerCfg> configurationClass() {
877      return JMXConnectionHandlerCfg.class;
878    }
879
880
881
882    /**
883     * {@inheritDoc}
884     */
885    public DN dn() {
886      return impl.getDN();
887    }
888
889  }
890}