Package org.omg.CosNotifyFilter

Examples of org.omg.CosNotifyFilter.Filter


    public Filter get_filter(int filterId) throws FilterNotFound
    {
        Integer _key = new Integer(filterId);

        final Filter _filter;

        synchronized (filtersLock_)
        {
            _filter = (Filter) filters_.get(_key);
        }
View Full Code Here


        while (_filterIterator.hasNext())
        {
            try
            {
                final Filter _filter = (Filter) _filterIterator.next();

                if (match(_filter))
                {
                    return true;
                }
View Full Code Here

    {
        final AbstractFilter _servant = factoryDelegate_.create_filter_servant(grammar);

        registerFilter(_servant);

        Filter _filter = FilterHelper.narrow(_servant.activate());

        return _filter;
    }
View Full Code Here

  IntHolder
      _supplierAdminId = new IntHolder(),
      _consumerAdminId = new IntHolder();

  Filter _filter = null;
  try {
      _filter = filterFactory_.create_filter("EXTENDED_TCL");

      ConstraintExp[] _constraints = new ConstraintExp[1];
      _constraints[0] = new ConstraintExp();
      _constraints[0].event_types = new EventType[] {new EventType(EVENT_DOMAIN, "*")};
      _constraints[0].constraint_expr = "$.header.variable_header(" + WORKGROUP_ID + ") != " + _id.intValue();

      _filter.add_constraints(_constraints);

      SupplierAdmin _supplierAdmin =
    channel_.new_for_suppliers(InterFilterGroupOperator.AND_OP, _supplierAdminId);

      ConsumerAdmin _consumerAdmin =
View Full Code Here

        while (_filterIterator.hasNext())
        {
            try
            {
                final Filter _filter = (Filter) _filterIterator.next();

                if (match(_filter))
                {
                    return true;
                }
View Full Code Here

    }

    private void measureFilterLatency(String filterString, StructuredEvent event, int runs)
            throws Exception
    {
        Filter _filter = createFilter(filterString);

        long _start = System.currentTimeMillis();

        for (int x = 0; x < runs; ++x)
        {
            boolean _r = _filter.match_structured(event);
            assertTrue(_r);
        }

        long _total = System.currentTimeMillis() - _start;
View Full Code Here

                + " in average: " + (_total / runs));
    }

    private Filter createFilter(String filterString) throws InvalidGrammar, InvalidConstraint
    {
        Filter _filter = filterFactory_.create_filter("EXTENDED_TCL");
        ConstraintExp[] _constraintExp = new ConstraintExp[1];
        EventType[] _eventType = new EventType[1];
        _eventType[0] = new EventType("*", "*");
        String _expression = filterString;
        _constraintExp[0] = new ConstraintExp(_eventType, _expression);
        _filter.add_constraints(_constraintExp);
       
        return _filter;
    }
View Full Code Here

        return _filter;
    }

    private void measureFilterLatency(String filterString, Any event, int runs) throws Exception
    {
        Filter _filter = createFilter(filterString);

        long _start = System.currentTimeMillis();

        for (int x = 0; x < runs; ++x)
        {
            boolean _r = _filter.match(event);
            assertTrue(_r);
        }

        long _total = System.currentTimeMillis() - _start;
View Full Code Here

        super(name, setup);
    }

    public void testCreateBSHFilter() throws Exception
    {
        Filter _filter = objectUnderTest_.create_filter(BSHFilter.CONSTRAINT_GRAMMAR);

        assertEquals(BSHFilter.CONSTRAINT_GRAMMAR, _filter.constraint_grammar());
    }
View Full Code Here

        String _factoryRef = getORB().object_to_string(factoryServant_.activate());

        FilterFactory _factory = FilterFactoryHelper.narrow(getClientORB().string_to_object(_factoryRef));

        Filter _filter = _factory.create_filter("EXTENDED_TCL");

        assertFalse(_filter._non_existent());

        // wait some time. give gc thread chance to clean up filter.
        Thread.sleep(10000);

        try
        {
            Any any = toAny(5);
            _filter.match(any);
        } catch (OBJECT_NOT_EXIST e)
        {
            // expected
        }
    }
View Full Code Here

TOP

Related Classes of org.omg.CosNotifyFilter.Filter

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.