Examples of Router

  • com.subgraph.orchid.Router
  • com.vtence.molecule.middlewares.Router
  • com.woorea.openstack.quantum.model.Router
  • javax.sip.address.Router
    The Router interface may be implemented by the application to provide custom routing logic. It is used to determine the next hop for a given request.

    For backwards compatibility reasons, the default behavior of the stack is to consult the application provided Router implementation for all requests outside of a dialog. This is controlled through the stack property javax.sip.USE_ROUTER_FOR_ALL_URIS which defaults to true when not set.

    This specification recommends to set the stack property javax.sip.USE_ROUTER_FOR_ALL_URIS to false. This will cause the stack to only consult the application provided Router implementation for requests with a non-SIP URI as request URI (such as tel: or pres:) and without Route headers. This enables an application to implement DNS lookups and other resolution algorithms

    When javax.sip.USE_ROUTER_FOR_ALL_URIS is set to false, the next hop is determined according to the following algorithm:

    Note: In case the topmost Route header contains no 'lr' parameter (which means the next hop is a strict router), the implementation will perform 'Route Information Postprocessing' as described in RFC3261 section 16.6 step 6 (also known as "Route header popping"). That is, the following modifications will be made to the request:

    1. The implementation places the Request-URI into the Route header field as the last value.
    2. The implementation then places the first Route header field value into the Request-URI and removes that value from the Route header field.
    Subsequently, the request URI will be used as next hop target.

    The location (classname) of the user-defined Router object is supplied in the Properties object passed to the {@link javax.sip.SipFactory#createSipStack(Properties)} method upon creationof the SIP Stack object. The Router object must accept a SipStack as an argument to the constructor in order for the Router to access attributes of the SipStack The constructor of an object implementing the Router interface must be RouterImpl(SipStack sipStack, String outboundProxy) {}

    The routing policy can not be changed dynamically, i.e. the SipStack needs to be deleted and re-created. Outbound proxy should be passed to the {@link javax.sip.SipFactory#createSipStack(Properties)} method upon creationof the SIP Stack object.

    Application Notes

    A UAC application which desires to use a particular outbound proxy should prepend a Route header with the URI of that proxy (and 'lr' flag if appropriate). Alternatively, it may achieve the same result by setting the OUTBOUND_PROXY property (although the Route header approach is more flexible and therefore RECOMMENDED)

    A proxy application may either rewrite the request URI (if the proxy is responsible for the domain), or prepend a Route header. @author BEA Systems, NIST @version 1.2

  • jmt.engine.NodeSections.Router
    This class implements a router, which routes the jobs according to the specified routing strategies (one for each job class).

    The class has different constructors to create a generic router or a blocking region border queue, that is the router of a node which is inside a blocking region and which sends jobs also to nodes outside the region. When a job leaves the blocking region, the region input station must receive a message, in order to serve the blocked jobs.
    However it's also possible to create a generic router and then to turn on/off the "border router" behaviour using the borderRouterTurnON(..) and borderRouterTurnOFF() methods. @author Francesco Radaelli, Stefano Omini @author Bertoli Marco - Fixed lockup issues with closed class and sinks 13/11/2005 @author Bertoli Marco - Fixed bug with multiserver stationsModified by Ashanka (Oct 2009) for FCR Bug fix: Events are created with job instead of null for EVENT_JOB_OUT_OF_REGION
  • juzu.impl.router.Router
    The router takes care of mapping a request to a a map. @author Julien Viet @version $Revision$
  • ninja.Router
  • org.exoplatform.web.controller.router.Router
    The router takes care of mapping a request to a a map. @author Julien Viet @version $Revision$
  • org.glassfish.jersey.server.internal.routing.Router
    Hierarchical request router that can be used to create dynamic routing tree structures. Each routing tree can be executed using a dedicated {@link RoutingStage routing stage}. @author Marek Potociar (marek.potociar at oracle.com)
  • org.jboss.messaging.core.Router
    Routes a routable to a maximum of one of the attached receivers @author Ovidiu Feodorov @author Tim Fox @version $Revision: 1270 $$Id: Router.java 1270 2006-09-09 11:48:48Z timfox $
  • org.jclouds.openstack.neutron.v2.domain.Router
    tack.org/api/openstack-network/2.0/content/router_ext_concepts.html">api doc
  • org.jclouds.openstack.neutron.v2_0.domain.Router
    stack.org/api/openstack-network/2.0/content/router_ext_concepts.html">api doc
  • org.midonet.client.resource.Router
  • org.mule.api.annotations.meta.Router
  • org.restlet.Router
  • org.restlet.routing.Router
    stlet.org/docs_2.1/376-restlet.html">User Guide - Routers and hierarchical URIs @author Jerome Louvel
  • org.slim3.controller.router.Router
    The collection of constants of class. @author taedium @since 1.0.0
  • org.smslib.routing.Router
    Base message routing class. Service owns instance of Router (or its subclass), and uses its member functions to designate gateway(s) to send particular outgoing message. It is allowed that router designates more than modem to send message. It is responsibility of Router to decide which gateway will send the message. Custom routing rules are possible by creating subclass. @author Tomek Cejner
  • org.sonatype.nexus.componentviews.Router
    Polls an ordered list of {@link RequestMatcher}s to find the first one willing to handle a given request. @since 3.0
  • org.waveprotocol.wave.federation.xmpp.MockOutgoingPacketTransport.Router
  • su.mauser.router.Router
    Маршрутизатор страниц. При отсутствии соединения с БД отображает страницу с ошибкой.

  • Examples of org.midonet.client.resource.Router

                       .outboundFilterId(post.getId())
                       .create();
        }

        private Router getOrCreateGuestNetworkRouter(long id, String accountUuid, boolean isVpc) {
            Router tenantRouter = getGuestNetworkRouter(id, accountUuid, isVpc);
            if(tenantRouter == null){
                tenantRouter = createRouter(id, accountUuid, isVpc);
            }
            return tenantRouter;
        }
    View Full Code Here

    Examples of org.midonet.client.resource.Router

        private void deleteGuestNetworkRouters(Network network){
            String accountUuid = getAccountUuid(network);
            boolean isVpc = getIsVpc(network);
            long id = getRouterId(network, isVpc);

            Router tenantRouter = getGuestNetworkRouter(id, accountUuid, isVpc);

            // Delete any peer ports corresponding to this router
            for(Port peerPort : tenantRouter.getPeerPorts((new MultivaluedMapImpl()))){
                if(peerPort != null && peerPort instanceof RouterPort){
                    RouterPort checkPort = (RouterPort) peerPort;
                    if(checkPort.getType().equals("ExteriorRouter")) {
                        checkPort.vifId(null).update();
                    } else if (checkPort.getType().equals("InteriorRouter")) {
                        checkPort.unlink();
                    }
                    checkPort.delete();
                } else if (peerPort != null && peerPort instanceof BridgePort) {
                    BridgePort checkPort = (BridgePort) peerPort;
                    if(checkPort.getType().equals("ExteriorBridge")) {
                        checkPort.vifId(null).update();
                    } else if (checkPort.getType().equals("InteriorBridge")) {
                        checkPort.unlink();
                    }
                    checkPort.delete();
                }
            }

            if(tenantRouter != null){
                // Remove all peer ports if any exist
                for(RouterPort p : tenantRouter.getPorts(new MultivaluedMapImpl())) {
                    if(p.getType().equals("ExteriorRouter")) {
                        // Set VIF ID to null
                        p.vifId(null).update();
                        // the port might have some chains associated with it
                    }

                    if(p.getType().equals("InteriorRouter")) {
                        p.unlink();
                    }

                    // Delete port
                    p.delete();
                }

                // Remove inbound and outbound filter chains
                String accountIdStr = String.valueOf(accountUuid);
                String routerName = getRouterName(isVpc, id);

                RuleChain pre = api.getChain(tenantRouter.getInboundFilterId());
                RuleChain preFilter = getChain(accountIdStr, routerName, RuleChainCode.TR_PREFILTER);
                RuleChain preNat = getChain(accountIdStr, routerName, RuleChainCode.TR_PRENAT);
                RuleChain post = api.getChain(tenantRouter.getOutboundFilterId());

                pre.delete();
                preFilter.delete();
                preNat.delete();
                post.delete();


                // Remove routes
                for(Route r : tenantRouter.getRoutes(new MultivaluedMapImpl())) {
                    r.delete();
                }

                tenantRouter.delete();
            }
        }
    View Full Code Here

    Examples of org.mule.api.annotations.meta.Router

        protected void processInboundRouters(Class componentFactoryClass, org.mule.api.service.Service service) throws MuleException
        {
            for (int i = 0; i < componentFactoryClass.getAnnotations().length; i++)
            {
                Annotation annotation = componentFactoryClass.getAnnotations()[i];
                Router routerAnnotation = annotation.annotationType().getAnnotation(Router.class);
                if (routerAnnotation != null && routerAnnotation.type() == RouterType.Inbound)
                {
                    MessageProcessorAnnotationParser parser = parserFactory.getRouterParser(annotation, componentFactoryClass, null);
                    if (parser != null)
                    {
                        ((ServiceCompositeMessageSource) service.getMessageSource()).addMessageProcessor(parser.parseMessageProcessor(annotation));
    View Full Code Here

    Examples of org.restlet.Router

      }
     
      @Override
      public Restlet createRoot()
      {
        Router router = new Router(getContext());
        router.setDefaultMatchingMode(Template.MODE_EQUALS);
        router.attach("/clusters", ClustersResource.class);
        router.attach("/clusters/{clusterName}", ClusterResource.class);
        router.attach("/clusters/{clusterName}/resourceGroups", ResourceGroupsResource.class);
        router.attach("/clusters/{clusterName}/resourceGroups/{resourceName}", ResourceGroupResource.class);
        router.attach("/clusters/{clusterName}/instances", InstancesResource.class);
        router.attach("/clusters/{clusterName}/instances/{instanceName}", InstanceResource.class);
        router.attach("/clusters/{clusterName}/instances/{instanceName}/currentState/{resourceName}", CurrentStateResource.class);
        router.attach("/clusters/{clusterName}/instances/{instanceName}/statusUpdate/{resourceName}", StatusUpdateResource.class);
        router.attach("/clusters/{clusterName}/instances/{instanceName}/errors/{resourceName}", ErrorResource.class);
        router.attach("/clusters/{clusterName}/instances/{instanceName}/currentState", CurrentStatesResource.class);
        router.attach("/clusters/{clusterName}/instances/{instanceName}/statusUpdate", StatusUpdatesResource.class);
        router.attach("/clusters/{clusterName}/instances/{instanceName}/errors", ErrorsResource.class);
        router.attach("/clusters/{clusterName}/resourceGroups/{resourceName}/idealState", IdealStateResource.class);
        router.attach("/clusters/{clusterName}/resourceGroups/{resourceName}/externalView", ExternalViewResource.class);
        router.attach("/clusters/{clusterName}/StateModelDefs/{modelName}", StateModelResource.class);
        router.attach("/clusters/{clusterName}/StateModelDefs", StateModelsResource.class);
        router.attach("/clusters/{clusterName}/SchedulerTasks", SchedulerTasksResource.class);
        router.attach("/clusters/{clusterName}/Controller", ControllerResource.class);
        router.attach("/clusters/{clusterName}/Controller/statusUpdates/{MessageType}/{MessageId}", ControllerStatusUpdateResource.class);
        router.attach("/clusters/{clusterName}/configs", ConfigResource.class);
        router.attach("/clusters/{clusterName}/configs/{scope}", ConfigResource.class);
        router.attach("/clusters/{clusterName}/configs/{scope}/{scopeKey1}", ConfigResource.class);
        router.attach("/clusters/{clusterName}/configs/{scope}/{scopeKey1}/{scopeKey2}", ConfigResource.class);
        router.attach("/zkPath", ZkPathResource.class).setMatchingMode(Template.MODE_STARTS_WITH);
        router.attach("/zkChild", ZkChildResource.class).setMatchingMode(Template.MODE_STARTS_WITH);

        Restlet mainpage = new Restlet()
        {
          @Override
          public void handle(Request request, Response response)
          {
            StringBuilder stringBuilder = new StringBuilder();
            stringBuilder.append("<html>");
            stringBuilder
                .append("<head><title>Restlet Cluster Management page</title></head>");
            stringBuilder.append("<body bgcolor=white>");
            stringBuilder.append("<table border=\"0\">");
            stringBuilder.append("<tr>");
            stringBuilder.append("<td>");
            stringBuilder.append("<h1>Rest cluster management interface V1</h1>");
            stringBuilder.append("</td>");
            stringBuilder.append("</tr>");
            stringBuilder.append("</table>");
            stringBuilder.append("</body>");
            stringBuilder.append("</html>");
            response.setEntity(new StringRepresentation(stringBuilder.toString(),
                MediaType.TEXT_HTML));
          }
        };
        router.attach("", mainpage);
        return router;
      }
    View Full Code Here

    Examples of org.restlet.Router

      }
     
      @Override
      public Restlet createRoot()
      {
        Router router = new Router(getContext());
        router.attach("/" + ZKPropertyTransferServer.RESTRESOURCENAME, ZNRecordUpdateResource.class);
        return router;
      }
    View Full Code Here

    Examples of org.restlet.Router

      }
      @Override
      public Restlet createRoot()
      {
      Router router = new Router(_context);

        Restlet mainpage = new Restlet()
        {
          @Override
          public void handle(Request request, Response response)
          {
            StringBuilder stringBuilder = new StringBuilder();
            stringBuilder.append("<html>");
            stringBuilder
                .append("<head><title>Restlet Cluster Management page</title></head>");
            stringBuilder.append("<body bgcolor=white>");
            stringBuilder.append("<table border=\"0\">");
            stringBuilder.append("<tr>");
            stringBuilder.append("<td>");
            stringBuilder.append("<h1>Rest cluster management interface V1</h1>");
            stringBuilder.append("</td>");
            stringBuilder.append("</tr>");
            stringBuilder.append("</table>");
            stringBuilder.append("</body>");
            stringBuilder.append("</html>");
            response.setEntity(new StringRepresentation(stringBuilder.toString(),
                MediaType.TEXT_HTML));
          }
        };
       
        if (_mockNode == null) {
          logger.debug("_mockNode in createRoot is null");
        }
        router.attach("", mainpage);
       
        //Espresso handlers
        router.attach("/{"+DATABASENAME+"}/{"+TABLENAME+"}/{"+RESOURCENAME+"}", EspressoResource.class);
        router.attach("/{"+DATABASENAME+"}/{"+TABLENAME+"}/{"+RESOURCENAME+"}/{"+SUBRESOURCENAME+"}", EspressoResource.class);
       
        //Admin handlers
        router.attach("/{"+STOPSERVICECOMMAND+"}", StopServiceResource.class);
       
        return router;
      }
    View Full Code Here

    Examples of org.restlet.Router

            }
        }

        public Restlet createRoot() {
            if (myRouter == null){
                myRouter = new Router();

                Iterator i =
                    GeoServerExtensions.extensions(RESTMapping.class).iterator();

                while (i.hasNext()){
    View Full Code Here

    Examples of org.restlet.Router

            System.out.println(message);
            response.getOutputStream().write(message.getBytes());
        }

        public Restlet createRoot() {
            Router router = new Router();

            SpringContext springContext = new SpringContext(getContext());

            springContext.getXmlConfigRefs().add("war://WEB-INF/classes/applicationContext.xml");
            //       router.setRequiredScore(0);
            //       router.attach("/roles", new UserRestlet("Role Management Page"));
            router.attach("/user/{name}", new UserRestlet(null));
            router.attach("/dummy", new DummyRestlet(springContext));

            //       router.attach("/geoserver/users/{user}/roles", new UserRestlet("getting role information"));
            return router;
        }
    View Full Code Here

    Examples of org.restlet.Router

        /**
         * Create the Restlet that will handle the requests after they are translated.
         * @return the Restlet to handle requests
         */
        public Restlet createRoot() {
            Router router = new Router();

            EditableUserDAO eud = (EditableUserDAO) getApplicationContext()
                                                        .getBean("userDetailsService");
            // router.attach("/roles", new UserRestlet("Role Management Page"));
            router.attach("/user.{type}", new UserFinder(router.getContext(), eud));
            router.attach("/user", new UserFinder(router.getContext(), eud));
            router.attach("/user/{name}.{type}", new UserFinder(router.getContext(), eud));
            router.attach("/user/{name}", new UserFinder(router.getContext(), eud));
            router.attach("/dummy/{name}", new DummyRestlet(getApplicationContext()));

            // router.attach("/geoserver/users/{user}/roles", new
            // UserRestlet("getting role information"));
            return router;
        }
    View Full Code Here

    Examples of org.restlet.Router

            }
        }

        public Restlet createRoot() {
            if (myRouter == null){
                myRouter = new Router() {
                    @Override
                    protected synchronized void init(Request request,
                            Response response) {
                        super.init(request, response);
    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.