Examples of Selector

@version $Revision: 1.1 $ $Date: 2004/11/26 01:50:44 $ @author Tim Anderson
  • org.graphstream.ui.graphicGraph.stylesheet.Selector
    A selector is the part of a CSS rule that defines to which element a style applies in the graph. @author Antoine Dutot @author Yoann Pign�
  • org.jamesii.asf.database.hibernate.Selector
    Hibernate implementation of a selector. @author Roland Ewald
  • org.jamesii.asf.spdm.generators.Selector
    Super class for selectors, implements idea of using a predictor (see {@link IPerfComparisonPredictor}) to sort a list. @author Roland Ewald
  • org.jboss.dna.graph.query.model.Selector
  • org.jboss.jms.selector.Selector
    This class implements a Message Selector. @author Norbert Lataille @author Juha Lindfors @author Jason Dillon @author Scott Stark @author Tim Fox @version $Revision: 2284 $$Id: Selector.java 2284 2007-02-13 06:47:23Z ovidiu.feodorov@jboss.com $
  • org.jboss.jms.server.selector.Selector
    This class implements a Message Selector. @author Norbert Lataille @author Juha Lindfors @author Jason Dillon @author Scott Stark @author Tim Fox @version $Revision: 3168 $$Id: Selector.java 3168 2007-10-03 02:34:11Z clebert.suconic@jboss.com $
  • org.jitterbit.application.ui.widget.SectionedSplitPane.Selector
  • org.mizartools.dli.Selector
  • org.modeshape.jcr.query.model.Selector
  • org.openstreetmap.josm.gui.mappaint.mapcss.Selector
    MapCSS selector. A rule has two parts, a selector and a declaration block e.g.
     way[highway=residential]     { width: 10; color: blue; }  
    The selector decides, if the declaration block gets applied or not. All implementing classes of Selector are immutable.
  • org.sbml.jsbml.ext.multi.Selector
    A selector is a mask describing the rules that an entity has to pass in order to be used or rejected. This selector is built of different components, carrying state features. The components can be bound together or not. In a population-based model, the selector, when applied to a pool of entities, permits to filter it, and to obtain a further, more refined, entity pool.

    A selector can be reused in various places of a model, to restrict the application of a procedure to a certain set of topologies and states. Selectors can be used to refine the initial conditions of a species, for instance to specify the initial distribution of different states and topologies. They can also be used in a reaction to decide if a this reaction happens, or to modulate its velocity, in function of the state or topology of a reactant.

    A selector defines the list of components composing the mask, that are species type existing under a given state (that can be an ensemble of elementary states). In addition to the components, the selector lists the possible or mandatory bonds, as well as the components that must not be bound. It is to be noted that a selector must not necessarily be the most parsimonious. One can use the selectors to describe the fine-grained topology of complexes, even if this topology is not used to decide upon particular reactions. @author Nicolas Rodriguez @since 1.0 @version $Rev: 1639 $

  • org.scale7.cassandra.pelops.Selector
    Facilitates the selective retrieval of column data from rows in a Cassandra keyspace.

    Note:The methods that are marked as throwing {@link org.scale7.cassandra.pelops.exceptions.NotFoundException}are the only methods in Pelops that throw exceptions under non-failure conditions. @author dominicwilliams

  • org.scopemvc.core.Selector
  • org.skyscreamer.yoga.selector.Selector
  • org.w3c.css.sac.Selector
    This interface defines a selector.

    Remarks: Not all the following selectors are supported (or will be supported) by CSS.

    All examples are CSS2 compliant. @version $Revision: 1.12 $ @author Philippe Le Hegaret

  • org.w3c.flex.forks.css.sac.Selector
    This interface defines a selector.

    Remarks: Not all the following selectors are supported (or will be supported) by CSS.

    All examples are CSS2 compliant. @version $Revision: 1.2 $ @author Philippe Le Hegaret

  • org.xhtmlrenderer.css.newmatch.Selector
    A Selector is really a chain of CSS selectors that all need to be valid for the selector to match. @author Torbjörn Gannholm
  • org.xorm.query.Selector
  • org.zkoss.selector.model.Selector
    @author simonpai
  • r.nodes.exec.Selector
  • reactor.event.selector.Selector
    A {@literal Selector} is a wrapper around an arbitrary object. @author Jon Brisbin @author Stephane Maldini @author Andy Wilkinson
  • tripleplay.ui.Selector
    Maintains a single selected item among a specified set of {@code Element} instances. Theelements may be added individually, or the children of an {@code Elements} may be trackedautomatically.

    A click on a tracked element that implements {@code Clickable} makes it the selected item, or{@code selected} can be used to manually control the selected item.


  • Examples of com.sun.messaging.jmq.util.selector.Selector

                type = (inttype == null) ? 0 : inttype.intValue();
                selectorstr = (String )props.get("JMQSelector");

                if (selectorstr != null) {
                    Selector selector = Selector.compile(selectorstr);
                    selector = null;
                }

                boolean notFound = false;
    View Full Code Here

    Examples of com.sun.org.apache.xerces.internal.impl.xs.identity.Selector

            return (Boolean) fMayMatchFieldMap.get(field);
        } // mayMatch(Field):Boolean

        // a utility method for Identity constraints
        private void activateSelectorFor(IdentityConstraint ic) {
            Selector selector = ic.getSelector();
            FieldActivator activator = this;
            if (selector == null)
                return;
            XPathMatcher matcher = selector.createMatcher(activator, fElementDepth);
            fMatcherStack.addMatcher(matcher);
            matcher.startDocumentFragment();
        }
    View Full Code Here

    Examples of com.volantis.mcs.themes.Selector

            List rules = styleSheet.getRules();
            for (int i=0; i< rules.size(); i++) {
                // Extract each rule.
                Rule rule = (Rule) rules.get(i);

                Selector selector = (Selector) rule.getSelectors().get(0);
                visitor.addStyles(styles, selector, rule.getProperties());
            }
        }
    View Full Code Here

    Examples of de.scoopgmbh.copper.persistent.adapter.AdapterCallPersisterFactory.Selector

            if (run && queue.size() < triggerReloadQueueLength) {
              try {
                List<AdapterCall> newElements = ctrl.run(new DatabaseTransaction<List<AdapterCall>>() {
                  @Override
                  public List<AdapterCall> run(Connection con) throws Exception {
                    Selector s = persistence.createSelector();
                    return s.dequeue(con, adapterIds, transientQueueLength-queue.size());
                  }
                });
                if (!newElements.isEmpty())
                  waitMillis = 1;
                queue.addAll(
    View Full Code Here

    Examples of java.nio.channels.Selector

        private static int readWithTemporarySelector(final SelectableChannel channel, final ByteBuffer byteBuffer, final long readTimeout, final ISelectorFactory selectorFactory)
                throws IOException {
            int count = 1;
            int byteRead = 0;
            int preReadInputBBPos = byteBuffer.position();
            Selector readSelector = null;
            SelectionKey tmpKey = null;

            try {
                ReadableByteChannel readableChannel = (ReadableByteChannel) channel;
                while(count > 0) {
                    count = readableChannel.read(byteBuffer);
                    if(count > -1) {
                        byteRead += count;
                    } else {
                        byteRead = count;
                    }
                }

                if(byteRead == 0 && byteBuffer.position() == preReadInputBBPos) {
                    readSelector = selectorFactory.getSelector();

                    if(readSelector == null) {
                        return 0;
                    }
                    count = 1;

                    tmpKey = channel.register(readSelector, SelectionKey.OP_READ);
                    tmpKey.interestOps(tmpKey.interestOps() | SelectionKey.OP_READ);
                    int code = readSelector.select(readTimeout);
                    tmpKey.interestOps(tmpKey.interestOps() & (~SelectionKey.OP_READ));

                    if(code == 0) {
                        return 0; // Return on the main Selector and try again.
                    }

                    while(count > 0) {
                        count = readableChannel.read(byteBuffer);
                        if(count > -1) {
                            byteRead += count;
                        } else {
                            byteRead = count;
                        }
                    }
                } else if(byteRead == 0 && byteBuffer.position() != preReadInputBBPos) {
                    byteRead += (byteBuffer.position() - preReadInputBBPos);
                }
            } finally {
                if(tmpKey != null) {
                    tmpKey.cancel();
                }
                if(readSelector != null) {// Bug 6403933
                    try {
                        readSelector.selectNow();
                    } catch (IOException e) {
                        ;
                    }
                    selectorFactory.returnSelector(readSelector);
                }
    View Full Code Here

    Examples of java.nio.channels.Selector

                RubyIO io = (RubyIO)recv.getInstanceVariables().getInstanceVariable("@io");

                int timeout = RubyNumeric.fix2int(recv.getInstanceVariables().getInstanceVariable("@read_timeout")) * 1000;
                NativeImpl nim = (NativeImpl)recv.dataGetStruct();

                Selector selector = null;
                try {
                    selector = Selector.open();
                    nim.channel.configureBlocking(false);
                    SelectionKey key = nim.channel.register(selector, SelectionKey.OP_READ);
                    int n = selector.select(timeout);

                    if(n > 0) {
                        IRubyObject readItems = io.read(new IRubyObject[]{recv.getRuntime().newFixnum(1024*16)});
                        return buf.concat(readItems);
                    } else {
                        RubyClass exc = (RubyClass)(recv.getRuntime().getModule("Timeout").getConstant("Error"));
                        throw new RaiseException(RubyException.newException(recv.getRuntime(), exc, "execution expired"),false);
                    }
                } catch(IOException exception) {
                    throw recv.getRuntime().newIOErrorFromException(exception);
                } finally {
                    if (selector != null) {
                        try {
                            selector.close();
                        } catch (IOException ioe) {
                        }
                    }
                }
            }
    View Full Code Here

    Examples of java.nio.channels.Selector

                return true;
            }
        }
       
        public void interrupt() {
            Selector selector = currentSelector;
            if (selector != null) {
                selector.wakeup();
            }
            BlockingIO.Condition iowait = blockingIO;
            if (iowait != null) {
                iowait.cancel();
            }
    View Full Code Here

    Examples of java.nio.channels.Selector

            Channel channel = descriptor.getChannel();
            if (channel == null || !(channel instanceof SelectableChannel)) {
                return false;
            }
          
            Selector selector = Selector.open();

            ((SelectableChannel) channel).configureBlocking(false);
            int real_ops = ((SelectableChannel) channel).validOps() & SelectionKey.OP_WRITE;
            SelectionKey key = ((SelectableChannel) channel).keyFor(selector);
          
            if (key == null) {
                ((SelectableChannel) channel).register(selector, real_ops, descriptor);
            } else {
                key.interestOps(key.interestOps()|real_ops);
            }

            while(selector.select() == 0);

            for (Iterator i = selector.selectedKeys().iterator(); i.hasNext(); ) {
                SelectionKey skey = (SelectionKey) i.next();
                if ((skey.interestOps() & skey.readyOps() & (SelectionKey.OP_WRITE)) != 0) {
                    if(skey.attachment() == descriptor) {
                        return true;
                    }
    View Full Code Here

    Examples of java.nio.channels.Selector

            Channel channel = descriptor.getChannel();
            if (channel == null || !(channel instanceof SelectableChannel)) {
                return false;
            }
          
            Selector selector = Selector.open();

            ((SelectableChannel) channel).configureBlocking(false);
            int real_ops = ((SelectableChannel) channel).validOps() & (SelectionKey.OP_READ | SelectionKey.OP_ACCEPT);
            SelectionKey key = ((SelectableChannel) channel).keyFor(selector);
          
            if (key == null) {
                ((SelectableChannel) channel).register(selector, real_ops, descriptor);
            } else {
                key.interestOps(key.interestOps()|real_ops);
            }

            while(selector.select() == 0);

            for (Iterator i = selector.selectedKeys().iterator(); i.hasNext(); ) {
                SelectionKey skey = (SelectionKey) i.next();
                if ((skey.interestOps() & skey.readyOps() & (SelectionKey.OP_READ | SelectionKey.OP_ACCEPT)) != 0) {
                    if(skey.attachment() == descriptor) {
                        return true;
                    }
    View Full Code Here

    Examples of java.nio.channels.Selector

        public static IRubyObject select_static(ThreadContext context, Ruby runtime, IRubyObject[] args) {
           try {
               Set pending = new HashSet();
               Set unselectable_reads = new HashSet();
               Set unselectable_writes = new HashSet();
               Selector selector = Selector.open();
               if (!args[0].isNil()) {
                   // read
                   checkArrayType(runtime, args[0]);
                   for (Iterator i = ((RubyArray) args[0]).getList().iterator(); i.hasNext(); ) {
                       IRubyObject obj = (IRubyObject) i.next();
                       RubyIO ioObj = convertToIO(context, obj);
                       if (registerSelect(context, selector, obj, ioObj, SelectionKey.OP_READ | SelectionKey.OP_ACCEPT)) {
                           if (ioObj.writeDataBuffered()) {
                               pending.add(obj);
                           }
                       } else {
                           if (( ioObj.openFile.getMode() & OpenFile.READABLE ) != 0) {
                               unselectable_reads.add(obj);
                           }
                       }
                   }
               }

               if (args.length > 1 && !args[1].isNil()) {
                   // write
                   checkArrayType(runtime, args[1]);
                   for (Iterator i = ((RubyArray) args[1]).getList().iterator(); i.hasNext(); ) {
                       IRubyObject obj = (IRubyObject) i.next();
                       RubyIO ioObj = convertToIO(context, obj);
                       if (!registerSelect(context, selector, obj, ioObj, SelectionKey.OP_WRITE)) {
                           if (( ioObj.openFile.getMode() & OpenFile.WRITABLE ) != 0) {
                               unselectable_writes.add(obj);
                           }
                       }
                   }
               }

               if (args.length > 2 && !args[2].isNil()) {
                   checkArrayType(runtime, args[2]);
                   // Java's select doesn't do anything about this, so we leave it be.
               }

               final boolean has_timeout = ( args.length > 3 && !args[3].isNil() );
               long timeout = 0;
               if(has_timeout) {
                   IRubyObject timeArg = args[3];
                   if (timeArg instanceof RubyFloat) {
                       timeout = Math.round(((RubyFloat) timeArg).getDoubleValue() * 1000);
                   } else if (timeArg instanceof RubyFixnum) {
                       timeout = Math.round(((RubyFixnum) timeArg).getDoubleValue() * 1000);
                   } else { // TODO: MRI also can hadle Bignum here
                       throw runtime.newTypeError("can't convert "
                               + timeArg.getMetaClass().getName() + " into time interval");
                   }

                   if (timeout < 0) {
                       throw runtime.newArgumentError("negative timeout given");
                   }
               }
              
               if (pending.isEmpty() && unselectable_reads.isEmpty() && unselectable_writes.isEmpty()) {
                   if (has_timeout) {
                       if (timeout==0) {
                           selector.selectNow();
                       } else {
                           selector.select(timeout);                      
                       }
                   } else {
                       selector.select();
                   }
               } else {
                   selector.selectNow();              
               }
              
               List r = new ArrayList();
               List w = new ArrayList();
               List e = new ArrayList();
               for (Iterator i = selector.selectedKeys().iterator(); i.hasNext(); ) {
                   SelectionKey key = (SelectionKey) i.next();
                   if ((key.interestOps() & key.readyOps()
                           & (SelectionKey.OP_READ|SelectionKey.OP_ACCEPT|SelectionKey.OP_CONNECT)) != 0) {
                       r.add(key.attachment());
                       pending.remove(key.attachment());
                   }
                   if ((key.interestOps() & key.readyOps() & (SelectionKey.OP_WRITE)) != 0) {
                       w.add(key.attachment());
                   }
               }
               r.addAll(pending);
               r.addAll(unselectable_reads);
               w.addAll(unselectable_writes);
              
               // make all sockets blocking as configured again
               for (Iterator i = selector.keys().iterator(); i.hasNext(); ) {
                   SelectionKey key = (SelectionKey) i.next();
                   SelectableChannel channel = key.channel();
                   synchronized(channel.blockingLock()) {
                       RubyIO originalIO = (RubyIO) TypeConverter.convertToType(
                               (IRubyObject) key.attachment(), runtime.getIO(),
                               MethodIndex.TO_IO, "to_io");
                       boolean blocking = originalIO.getBlocking();
                       key.cancel();
                       channel.configureBlocking(blocking);
                   }
               }
               selector.close();
              
               if (r.size() == 0 && w.size() == 0 && e.size() == 0) {
                   return runtime.getNil();
               }
              
    View Full Code Here
    TOP
    Copyright © 2018 www.massapi.com. 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.