Package org.apache.catalina.tribes.membership

Examples of org.apache.catalina.tribes.membership.McastService


            String key = (String)i.next();
            IntrospectionUtils.setProperty(sender,key,transportProperties.getProperty(key));
        }
        ps.setTransport(sender);

        McastService service = new McastService();
        service.setAddress(mcastaddr);
        if (mbind != null) service.setMcastBindAddress(mbind);
        service.setFrequency(mcastfreq);
        service.setMcastDropTime(mcastdrop);
        service.setPort(mcastport);

        ManagedChannel channel = new GroupChannel();
        channel.setChannelReceiver(rx);
        channel.setChannelSender(ps);
        channel.setMembershipService(service);
View Full Code Here


    private static final GroupChannel createChannel(String address, int port, String bindAddress) {

        //create a channel
        GroupChannel channel = new GroupChannel();
        McastService mcastService = (McastService)channel.getMembershipService();
        mcastService.setPort(port);
        mcastService.setAddress(address);

        // REVIEW: In my case, there are multiple IP addresses
        // One for the WIFI and the other one for VPN. For some reason the VPN one doesn't support
        // Multicast

        if (bindAddress != null) {
            mcastService.setBind(bindAddress);
        } else {
            mcastService.setBind(getBindAddress());
        }

        return channel;
    }
View Full Code Here

            String key = (String)i.next();
            IntrospectionUtils.setProperty(sender,key,transportProperties.getProperty(key));
        }
        ps.setTransport(sender);

        McastService service = new McastService();
        service.setMcastAddr(mcastaddr);
        if (mbind != null) service.setMcastBindAddress(mbind);
        service.setMcastFrequency(mcastfreq);
        service.setMcastDropTime(mcastdrop);
        service.setMcastPort(mcastport);

        ManagedChannel channel = new GroupChannel();
        channel.setChannelReceiver(rx);
        channel.setChannelSender(ps);
        channel.setMembershipService(service);
View Full Code Here

            String key = (String)i.next();
            IntrospectionUtils.setProperty(sender,key,transportProperties.getProperty(key));
        }
        ps.setTransport(sender);

        McastService service = new McastService();
        service.setAddress(mcastaddr);
        if (mbind != null) service.setMcastBindAddress(mbind);
        service.setFrequency(mcastfreq);
        service.setMcastDropTime(mcastdrop);
        service.setPort(mcastport);

        ManagedChannel channel = new GroupChannel();
        channel.setChannelReceiver(rx);
        channel.setChannelSender(ps);
        channel.setMembershipService(service);
View Full Code Here

    channel = newTribesChannel();
  }

  private Channel newTribesChannel() {
   
    McastService membership = new McastService();
   
    // default multicast address is 228.0.0.4
    // default multicast port is 45564
   
    Integer customPort = Integer.getInteger("wjc-multicast-port");
    if (customPort != null)
      membership.setPort(customPort.intValue());
   
   
    String customAddress = System.getProperty("wjc-multicast-address");
    if (customAddress != null)
      membership.setAddress(customAddress);
   
    ReceiverBase receiver = new NioReceiver();
    receiver.setAddress("auto");

    ReplicationTransmitter sender = new ReplicationTransmitter();
View Full Code Here

TOP

Related Classes of org.apache.catalina.tribes.membership.McastService

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.