api/src/main/java/org/commonjava/vertx/vabr/ApplicationRouter.java
public void bind( final RouteBinding handler )
    {
        final Method method = handler.getMethod();

        logger.info( "Using appId: {} and default version: {}", appAcceptId, defaultVersion );
        List<String> versions = handler.getVersions();
        if ( versions == null || versions.isEmpty() )
        {
            versions = Collections.singletonList( defaultVersion );
        }

        for ( final String version : versions )
        {
            final Set<Method> methods = new HashSet<>();
            if ( method == Method.ANY )
            {
                for ( final Method m : Method.values() )
                {
                    methods.add( m );
                }
            }
            else
            {
                methods.add( method );
            }

            for ( final Method m : methods )
            {
                final BindingKey key = new BindingKey( m, version );
                List<PatternRouteBinding> b = routeBindings.get( key );
                if ( b == null )
                {
                    b = new ArrayList<>();
                    routeBindings.put( key, b );
                }

                logger.info( "ADD: {}, Pattern: {}, Route: {}\n", key, handler.getPath(), handler );
                addPattern( handler, b );
            }
        }
    }
public void bind( final RouteBinding handler )
    {
        final Method method = handler.getMethod();

        logger.info( "Using appId: {} and default version: {}", appAcceptId, defaultVersion );
        List<String> versions = handler.getVersions();
        if ( versions == null || versions.isEmpty() )
        {
            versions = Collections.singletonList( defaultVersion );
        }

        for ( final String version : versions )
        {
            final Set<Method> methods = new HashSet<>();
            if ( method == Method.ANY )
            {
                for ( final Method m : Method.values() )
                {
                    methods.add( m );
                }
            }
            else
            {
                methods.add( method );
            }

            for ( final Method m : methods )
            {
                final BindingKey key = new BindingKey( m, version );
                List<PatternRouteBinding> b = routeBindings.get( key );
                if ( b == null )
                {
                    b = new ArrayList<>();
                    routeBindings.put( key, b );
                }

                logger.info( "ADD: {}, Pattern: {}, Route: {}\n", key, handler.getPath(), handler );
                addPattern( handler, b );
            }
        }
    }
public void bind ( final RouteBinding handler ) { final Method method = handler . getMethod ( ) ; logger . info ( "Using appId: {} and default version: {}" , appAcceptId , defaultVersion ) ; List < String > versions = handler . getVersions ( ) ; if ( versions == null || versions . isEmpty ( ) ) { versions = Collections . singletonList ( defaultVersion ) ; } for ( final String version : versions ) { final Set < Method > methods = new HashSet <> ( ) ; if ( method == Method . ANY ) { for ( final Method m : Method . values ( ) ) { methods . add ( m ) ; } } else { methods . add ( method ) ; } for ( final Method m : methods ) { final BindingKey key = new BindingKey ( m , version ) ; List < PatternRouteBinding > b = routeBindings . get ( key ) ; if ( b == null ) { b = new ArrayList <> ( ) ; routeBindings . put ( key , b ) ; } logger . info ( "ADD: {}, Pattern: {}, Route: {}\n" , key , handler . getPath ( ) , handler ) ; addPattern ( handler , b ) ; } } }
Specify a handler that will be called for all HTTP methods
@param pattern The simple pattern
@param handler The handler to call
Specify a handler that will be called for all HTTP methods