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.restlet.routing.Router

        router.attach("", NamespaceListResource.class);
        return router;
      }

      protected Restlet createQueriesRouter(Context c) {
        Router router = new Router(c);
        router.setDefaultMatchingMode(Template.MODE_STARTS_WITH);
        router.attach("/{" + QUERY_ID_PARAM + "}", new PreparedQueryResolver(c, new QueryTypeRouter(c,
            PreparedQueryResource.class)));
        router.attach("", new QueryParser(c, QueryListResource.class));
        return router;
      }
    View Full Code Here

    Examples of org.restlet.routing.Router

        super(context);
      }

      @Override
      public Restlet createInboundRoot() {
        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("/clusters/{clusterName}/constraints/{constraintType}", ConstraintResource.class);
        router.attach("/clusters/{clusterName}/constraints/{constraintType}/{constraintId}",
            ConstraintResource.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.routing.Router

        super(context);
      }

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

    Examples of org.restlet.routing.Router

            {
                application = new Application();
            }
            if (router == null)
            {
                router = new Router();
            }
        }
    View Full Code Here

    Examples of org.restlet.routing.Router

        }
      }

      protected Router createRouter(Context context)
      {
        return new Router(context);
      }
    View Full Code Here

    Examples of org.restlet.routing.Router

        super(context);
      }

      @Override
      public Restlet createInboundRoot() {
        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}/workflows", WorkflowsResource.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("/clusters/{clusterName}/constraints/{constraintType}", ConstraintResource.class);
        router.attach("/clusters/{clusterName}/constraints/{constraintType}/{constraintId}",
            ConstraintResource.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.routing.Router

        private static class TestApplication extends Application {

            @Override
            public Restlet createInboundRoot() {
                Router router = new Router(getContext());
                router.attach("/test", MyResource10.class);
                return router;
            }
    View Full Code Here

    Examples of org.restlet.routing.Router

    public class AnnotatedResource11TestCase extends RestletTestCase {

        private static class TestApplication extends Application {
            @Override
            public Restlet createInboundRoot() {
                Router router = new Router(getContext());
                router.attach("/test", MyResource11.class);
                return router;
            }
    View Full Code Here

    Examples of org.restlet.routing.Router

        protected Application createApplication(Component component) {
            final Application application = new Application() {
                @Override
                public Restlet createInboundRoot() {
                    final Router router = new Router(getContext());
                    router.attach("/test", SampleResource.class);
                    return router;
                }
            };

            return application;
    View Full Code Here

    Examples of org.restlet.routing.Router

        @Override
        public void setUp() {
            this.application = new Application() {
                @Override
                public Restlet createInboundRoot() {
                    Router router = new Router(getContext());
                    router.attachDefault(UserAgentTestResource.class);
                    return router;
                }
            };
        }
    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.