Package org.apache.ws.notification.topics.expression

Examples of org.apache.ws.notification.topics.expression.TopicExpressionEvaluator


    *
    * @return DOCUMENT_ME
    */
   public synchronized TopicExpressionEvaluator getEvaluator( String dialect )
   {
      TopicExpressionEvaluator evaluator = (TopicExpressionEvaluator) this.m_evaluators.get( dialect );
      return evaluator;
   }
View Full Code Here


         throw new org.apache.ws.notification.topics.expression.TopicPathDialectUnknownException( "nullArgument"
                                                                                                  + "topicExpression.dialect" );
      }

      String                   dialect   = topicExpression.getDialect(  ).toString(  );
      TopicExpressionEvaluator evaluator = getEvaluator( dialect );

      if ( evaluator == null )
      {
         if ( LOG.isDebugEnabled(  ) )
         {
            LOG.debug( "Dialect not supported:" + dialect );
            LOG.debug( "Registered dialects are:" );
            Iterator keyIterator = m_evaluators.keySet(  ).iterator(  );
            Object   key = null;
            while ( keyIterator.hasNext(  ) )
            {
               key = keyIterator.next(  );
               LOG.debug( key );
            }

            LOG.debug( "key.equals(dialect): " + ( key.equals( dialect.toString(  ) ) ) );
            LOG.debug( "this.evaluators.containsKey(dialect): "
                       + this.m_evaluators.containsKey( dialect.toString(  ) ) );
            LOG.debug( "HashCode of key: " + String.valueOf( key.hashCode(  ) ) );
            LOG.debug( "HashCode of dialect: " + String.valueOf( dialect.toString(  ).hashCode(  ) ) );
            LOG.debug( "Object stored for key: " + this.m_evaluators.get( key ) );
         }

         throw new TopicPathDialectUnknownException( "The dialect " + dialect + " was not recognized." );
      }

      return evaluator.evaluate( topicSpaceSet, topicExpression );
   }
View Full Code Here

         Context context = new InitialContext(  );
         list = context.list( JndiConstants.TOPIC_EXPRESSION_EVALUATOR_CONTEXT );
         while ( list.hasMore(  ) )
         {
            NameClassPair            pair      = (NameClassPair) list.next(  );
            TopicExpressionEvaluator evaluator =
               (TopicExpressionEvaluator) JNDIUtils.lookup( context,
                                                            JndiConstants.TOPIC_EXPRESSION_EVALUATOR_CONTEXT + "/"
                                                            + pair.getName(  ), TopicExpressionEvaluator.class );
            registerEvaluator( evaluator );
         }
View Full Code Here

            Context context = new InitialContext();
            list = context.list( JndiConstants.TOPIC_EXPRESSION_EVALUATOR_CONTEXT );
            while ( list.hasMore() )
            {
                NameClassPair pair = (NameClassPair) list.next();
                TopicExpressionEvaluator evaluator = (TopicExpressionEvaluator) JNDIUtils.lookup( context,
                        JndiConstants.TOPIC_EXPRESSION_EVALUATOR_CONTEXT + "/" + pair.getName(),
                        TopicExpressionEvaluator.class );
                registerEvaluator( evaluator );
            }
        }
View Full Code Here

        }
    }

    public synchronized TopicExpressionEvaluator getEvaluator( String dialect )
    {
        TopicExpressionEvaluator evaluator =
                (TopicExpressionEvaluator) this.m_evaluators.get( dialect );
        return evaluator;
    }
View Full Code Here

            throw new org.apache.ws.notification.topics.expression.TopicPathDialectUnknownException(
                     "nullArgument"+"topicExpression.dialect"  );
        }

        String dialect = topicExpression.getDialect().toString();
        TopicExpressionEvaluator evaluator = getEvaluator( dialect );

        if ( evaluator == null )
        {
            if ( LOG.isDebugEnabled() )
            {
                LOG.debug( "Dialect not supported:" + dialect );
                LOG.debug( "Registered dialects are:" );
                Iterator keyIterator = m_evaluators.keySet().iterator();
                Object key = null;
                while ( keyIterator.hasNext() )
                {
                    key = keyIterator.next();
                    LOG.debug( key );
                }
                LOG.debug( "key.equals(dialect): " + ( key.equals( dialect.toString() ) ) );
                LOG.debug( "this.evaluators.containsKey(dialect): " +
                        this.m_evaluators.containsKey( dialect.toString() ) );
                LOG.debug( "HashCode of key: " + String.valueOf( key.hashCode() ) );
                LOG.debug( "HashCode of dialect: " + String.valueOf( dialect.toString().hashCode() ) );
                LOG.debug( "Object stored for key: " + this.m_evaluators.get( key ) );
            }
            throw new TopicPathDialectUnknownException( "The dialect " + dialect + " was not recognized." );
        }
        return evaluator.evaluate( topicSpaceSet, topicExpression );
    }
View Full Code Here

TOP

Related Classes of org.apache.ws.notification.topics.expression.TopicExpressionEvaluator

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.