Package org.nasutekds.server.admin

Examples of org.nasutekds.server.admin.ClassPropertyDefinition


  {
    try
    {
      IdentityMapperCfgDefn definition =
           IdentityMapperCfgDefn.getInstance();
      ClassPropertyDefinition propertyDefinition =
           definition.getJavaClassPropertyDefinition();
      Class<? extends IdentityMapper> mapperClass =
           propertyDefinition.loadClass(className, IdentityMapper.class);
      IdentityMapper mapper = mapperClass.newInstance();

      if (initialize)
      {
        Method method = mapper.getClass().getMethod("initializeIdentityMapper",
View Full Code Here


  {
    try
    {
      KeyManagerProviderCfgDefn definition =
              KeyManagerProviderCfgDefn.getInstance();
      ClassPropertyDefinition propertyDefinition =
           definition.getJavaClassPropertyDefinition();
      Class<? extends KeyManagerProvider> providerClass =
           propertyDefinition.loadClass(className, KeyManagerProvider.class);
      KeyManagerProvider provider = providerClass.newInstance();


      if (initialize)
      {
View Full Code Here

    }

    try
    {
      EntryCacheCfgDefn                   definition;
      ClassPropertyDefinition             propertyDefinition;
      Class<? extends EntryCache>         cacheClass;
      EntryCache<? extends EntryCacheCfg> cache;

      definition = EntryCacheCfgDefn.getInstance();
      propertyDefinition = definition.getJavaClassPropertyDefinition();
      cacheClass = propertyDefinition.loadClass(className, EntryCache.class);

      // If there is some entry cache instance already initialized work with
      // it instead of creating a new one unless explicit init is requested.
      if (initialize || (entryCache == null)) {
        cache = (EntryCache<? extends EntryCacheCfg>) cacheClass.newInstance();
View Full Code Here


    // Get the work queue class, and load and instantiate an instance of it
    // using that configuration.
    WorkQueueCfgDefn definition = WorkQueueCfgDefn.getInstance();
    ClassPropertyDefinition propertyDefinition =
         definition.getJavaClassPropertyDefinition();
    Class<? extends WorkQueue> workQueueClass =
         propertyDefinition.loadClass(workQueueConfig.getJavaClass(),
                                      WorkQueue.class);

    try
    {
      WorkQueue workQueue = workQueueClass.newInstance();
View Full Code Here

  private boolean isJavaClassAcceptable(LogRotationPolicyCfg config,
                                        List<Message> unacceptableReasons)
  {
    String className = config.getJavaClass();
    LogRotationPolicyCfgDefn d = LogRotationPolicyCfgDefn.getInstance();
    ClassPropertyDefinition pd =
        d.getJavaClassPropertyDefinition();
    // Load the class and cast it to a RotationPolicy.
    Class<? extends RotationPolicy> theClass;
    try {
      theClass = pd.loadClass(className, RotationPolicy.class);
      theClass.newInstance();
    } catch (Exception e) {
      Message message = ERR_CONFIG_ROTATION_POLICY_INVALID_CLASS.get(className,
                                  config.dn().toString(),
                                  String.valueOf(e));
View Full Code Here

  private RotationPolicy getRotationPolicy(LogRotationPolicyCfg config)
      throws ConfigException {
    String className = config.getJavaClass();
    LogRotationPolicyCfgDefn d = LogRotationPolicyCfgDefn.getInstance();
    ClassPropertyDefinition pd =
        d.getJavaClassPropertyDefinition();
    // Load the class and cast it to a RotationPolicy.
    Class<? extends RotationPolicy> theClass;
    RotationPolicy rotationPolicy;
    try {
      theClass = pd.loadClass(className, RotationPolicy.class);
      rotationPolicy = theClass.newInstance();

      // Determine the initialization method to use: it must take a
      // single parameter which is the exact type of the configuration
      // object.
View Full Code Here

      QOSPolicyCfg policyConfiguration,
      List<Message> unacceptableReasons)
  {
    String className = policyConfiguration.getJavaClass();
    QOSPolicyCfgDefn d = QOSPolicyCfgDefn.getInstance();
    ClassPropertyDefinition pd = d.getJavaClassPropertyDefinition();

    // Validate the configuration.
    try
    {
      // Load the class and cast it to a network group policy factory.
      Class<? extends QOSPolicyFactory> theClass;
      QOSPolicyFactory factory;

      theClass = pd.loadClass(className, QOSPolicyFactory.class);
      factory = theClass.newInstance();

      // Determine the initialization method to use: it must take a
      // single parameter which is the exact type of the configuration
      // object.
View Full Code Here

      QOSPolicyCfg policyConfiguration) throws ConfigException,
      InitializationException
  {
    String className = policyConfiguration.getJavaClass();
    QOSPolicyCfgDefn d = QOSPolicyCfgDefn.getInstance();
    ClassPropertyDefinition pd = d.getJavaClassPropertyDefinition();

    // Load the class and cast it to a network group policy.
    Class<? extends QOSPolicyFactory> theClass;
    QOSPolicyFactory factory;

    try
    {
      theClass = pd.loadClass(className, QOSPolicyFactory.class);
      factory = theClass.newInstance();
    }
    catch (Exception e)
    {
      if (debugEnabled())
View Full Code Here

       throws InitializationException
  {
    try
    {
      AccountStatusNotificationHandlerCfgDefn definition;
      ClassPropertyDefinition propertyDefinition;
      Class<? extends AccountStatusNotificationHandler> handlerClass;
      AccountStatusNotificationHandler
         <? extends AccountStatusNotificationHandlerCfg> notificationHandler;

      definition = AccountStatusNotificationHandlerCfgDefn.getInstance();
      propertyDefinition =
          definition.getJavaClassPropertyDefinition();
      handlerClass = propertyDefinition.loadClass(
          className,
          AccountStatusNotificationHandler.class
          );
      notificationHandler =
        (AccountStatusNotificationHandler
View Full Code Here

  {
    try
    {
      AccessControlHandlerCfgDefn definition =
           AccessControlHandlerCfgDefn.getInstance();
      ClassPropertyDefinition propertyDefinition =
           definition.getJavaClassPropertyDefinition();
      Class<? extends AccessControlHandler> providerClass =
           propertyDefinition.loadClass(className, AccessControlHandler.class);
      AccessControlHandler<? extends AccessControlHandlerCfg> provider =
          (AccessControlHandler<? extends AccessControlHandlerCfg>)
           providerClass.newInstance();

      if (configuration != null)
View Full Code Here

TOP

Related Classes of org.nasutekds.server.admin.ClassPropertyDefinition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.