Examples of ChannelEndPoint


Examples of ch.ethz.iks.r_osgi.channels.ChannelEndpoint

        return primary.invokeMethod(mapping.getMapped(primary),
            methodSignature, args);
      } else {
        final int policy = p.intValue();
        if (policy == LOADBALANCING_ANY_POLICY) {
          final ChannelEndpoint endpoint = mapping.getAny();
          try {
            return endpoint.invokeMethod(mapping
                .getMapped(endpoint), methodSignature, args);
          } catch (final RemoteOSGiException e) {
            final ChannelEndpointImpl next = mapping.getNext();
            if (next != null) {
              primary.untrackRegistration(serviceURI);
View Full Code Here

Examples of ch.ethz.iks.r_osgi.channels.ChannelEndpoint

   * @see ch.ethz.iks.r_osgi.channels.ChannelEndpointManager#addRedundantEndpoint(ch.ethz.iks.r_osgi.URI,
   *      ch.ethz.iks.r_osgi.URI)
   */
  public void addRedundantEndpoint(final URI service,
      final URI redundantService) {
    final ChannelEndpoint redundantEndpoint = RemoteOSGiServiceImpl
        .getChannel(redundantService);
    primary.hasRedundantLinks = true;
    Mapping mapping = (Mapping) mappings.get(service);
    if (mapping == null) {
      mapping = new Mapping(service.toString());
View Full Code Here

Examples of ch.ethz.iks.r_osgi.channels.ChannelEndpoint

   * @see ch.ethz.iks.r_osgi.channels.ChannelEndpointManager#removeRedundantEndpoint(ch.ethz.iks.r_osgi.URI,
   *      ch.ethz.iks.r_osgi.URI)
   */
  public void removeRedundantEndpoint(final URI service,
      final URI redundantService) {
    final ChannelEndpoint redundantEndpoint = RemoteOSGiServiceImpl
        .getChannel(redundantService);
    final Mapping mapping = (Mapping) mappings.get(service.toString());
    mapping.removeRedundant(redundantEndpoint);
    if (mapping.isEmpty()) {
      mappings.remove(service);
View Full Code Here

Examples of com.consol.citrus.channel.ChannelEndpoint

        Map<String, ChannelEndpoint> endpoints = beanDefinitionContext.getBeansOfType(ChannelEndpoint.class);

        Assert.assertEquals(endpoints.size(), 4);

        // 1st message receiver
        ChannelEndpoint channelEndpoint = endpoints.get("channelEndpoint1");
        Assert.assertEquals(channelEndpoint.getEndpointConfiguration().getChannelName(), "channelName");
        Assert.assertNull(channelEndpoint.getEndpointConfiguration().getChannel());
        Assert.assertEquals(channelEndpoint.getEndpointConfiguration().getTimeout(), 5000L);
        Assert.assertNotNull(channelEndpoint.getEndpointConfiguration().getChannelResolver());
        Assert.assertEquals(channelEndpoint.getEndpointConfiguration().isUseObjectMessages(), false);

        // 2nd message receiver
        channelEndpoint = endpoints.get("channelEndpoint2");
        Assert.assertNull(channelEndpoint.getEndpointConfiguration().getChannelName());
        Assert.assertNotNull(channelEndpoint.getEndpointConfiguration().getChannel());
        Assert.assertEquals(channelEndpoint.getEndpointConfiguration().getTimeout(), 10000L);
        Assert.assertNull(channelEndpoint.getEndpointConfiguration().getChannelResolver());

        // 3rd message receiver
        channelEndpoint = endpoints.get("channelEndpoint3");
        Assert.assertNull(channelEndpoint.getEndpointConfiguration().getChannelName());
        Assert.assertNull(channelEndpoint.getEndpointConfiguration().getChannel());
        Assert.assertNull(channelEndpoint.getEndpointConfiguration().getChannelResolver());

        // 4th message receiver
        channelEndpoint = endpoints.get("channelEndpoint4");
        Assert.assertNotNull(channelEndpoint.getActor());
        Assert.assertEquals(channelEndpoint.getEndpointConfiguration().isUseObjectMessages(), true);
        Assert.assertEquals(channelEndpoint.getActor(), beanDefinitionContext.getBean("testActor", TestActor.class));
    }
View Full Code Here

Examples of com.consol.citrus.model.config.core.ChannelEndpoint

    private ChannelEndpointConverter endpointConverter = new ChannelEndpointConverter();

    @Test
    public void testConvert() throws Exception {
        EndpointData endpointData = endpointConverter.convert(new ChannelEndpoint());
        Assert.assertEquals(endpointData.getType(), "channel");
    }
View Full Code Here

Examples of org.apache.hedwig.server.delivery.ChannelEndPoint

                // want to start 1 ahead of the consume ptr
                MessageSeqId seqIdToStartFrom = MessageSeqId.newBuilder(resultOfOperation).setLocalComponent(
                                                    resultOfOperation.getLocalComponent() + 1).build();
                deliveryMgr.startServingSubscription(topic, subscriberId, seqIdToStartFrom,
                                                     new ChannelEndPoint(channel), TrueFilter.instance(), SubscriptionStateUtils
                                                     .isHubSubscriber(subRequest.getSubscriberId()));
            }
        }, null);

    }
View Full Code Here

Examples of org.apache.hedwig.server.delivery.ChannelEndPoint

                // want to start 1 ahead of the consume ptr
                MessageSeqId lastConsumedSeqId = subData.getState().getMsgId();
                MessageSeqId seqIdToStartFrom = MessageSeqId.newBuilder(lastConsumedSeqId).setLocalComponent(
                                                    lastConsumedSeqId.getLocalComponent() + 1).build();
                deliveryMgr.startServingSubscription(topic, subscriberId,
                        subData.getPreferences(), seqIdToStartFrom, new ChannelEndPoint(channel), filter,
                        new Callback<Void>() {
                            @Override
                            public void operationFinished(Object ctx, Void result) {
                                // First write success and then tell the delivery manager,
                                // otherwise the first message might go out before the response
View Full Code Here

Examples of org.apache.hedwig.server.delivery.ChannelEndPoint

                // want to start 1 ahead of the consume ptr
                MessageSeqId seqIdToStartFrom = MessageSeqId.newBuilder(resultOfOperation).setLocalComponent(
                                                    resultOfOperation.getLocalComponent() + 1).build();
                deliveryMgr.startServingSubscription(topic, subscriberId, seqIdToStartFrom,
                                                     new ChannelEndPoint(channel), TrueFilter.instance(), SubscriptionStateUtils
                                                     .isHubSubscriber(subRequest.getSubscriberId()));
            }
        }, null);

    }
View Full Code Here

Examples of org.codehaus.xfire.transport.ChannelEndpoint

        Channel c = t.createChannel();
        msg.setChannel(c);

        msg.setSerializer(new CopySerializer());

        c.setEndpoint(new ChannelEndpoint()
        {
            public void onReceive(MessageContext context, InMessage msg)
            {
                try
                {
View Full Code Here

Examples of org.eclipse.jetty.io.ChannelEndPoint

        {
            response.setContentType("text/plain");

            EndPoint endPoint = baseRequest.getHttpChannel().getEndPoint();
            assertThat("Endpoint",endPoint,instanceOf(ChannelEndPoint.class));
            ChannelEndPoint channelEndPoint = (ChannelEndPoint)endPoint;
            Socket socket = channelEndPoint.getSocket();
            ServerConnector connector = (ServerConnector)baseRequest.getHttpChannel().getConnector();

            PrintWriter out = response.getWriter();
            out.printf("connector.getReuseAddress() = %b%n",connector.getReuseAddress());
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.