Package org.glassfish.grizzly.utils.conditions

Examples of org.glassfish.grizzly.utils.conditions.Condition


     *          and listener was registered, null if current state is equal to required.
     *          In both cases listener will be notified
     */
    public Future<E> notifyWhenStateIsEqual(final E state,
            final CompletionHandler<E> completionHandler) {
        return notifyWhenConditionMatchState(new Condition() {

                @Override
                public boolean check() {
                    return state == StateHolder.this.state;
                }
View Full Code Here


     *          and listener was registered, null if current state is not equal to required.
     *          In both cases listener will be notified
     */
    public Future<E> notifyWhenStateIsNotEqual(final E state,
            final CompletionHandler<E> completionHandler) {
        return notifyWhenConditionMatchState(new Condition() {

                @Override
                public boolean check() {
                    return state != StateHolder.this.state;
                }
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    public GrizzlyFuture<Integer> notifyAvailable(final int size,
            CompletionHandler<Integer> completionHandler) {
        return notifyCondition(new Condition() {
            @Override
            public boolean check() {
                return available() >= size;
            }
        }, completionHandler);
View Full Code Here

TOP

Related Classes of org.glassfish.grizzly.utils.conditions.Condition

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.