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);
if ( throughput ) channel.addInterceptor(new ThroughputInterceptor());
if (gzip) channel.addInterceptor(new GzipInterceptor());
if ( frag ) {
FragmentationInterceptor fi = new FragmentationInterceptor();
fi.setMaxSize(fragsize);
channel.addInterceptor(fi);
}
if (order) {
OrderInterceptor oi = new OrderInterceptor();
oi.setMaxQueue(ordersize);
channel.addInterceptor(oi);
}
if ( async ) {
MessageDispatchInterceptor mi = new MessageDispatch15Interceptor();
mi.setMaxQueueSize(asyncsize);
channel.addInterceptor(mi);
System.out.println("Added MessageDispatchInterceptor");
}
if ( failuredetect ) {
TcpFailureDetector tcpfi = new TcpFailureDetector();
channel.addInterceptor(tcpfi);
}
if ( staticMembers.size() > 0 ) {
StaticMembershipInterceptor smi = new StaticMembershipInterceptor();
for (int x=0; x<staticMembers.size(); x++ ) {
smi.addStaticMember(staticMembers.get(x));
}
channel.addInterceptor(smi);
}
byte[] domain = new byte[] {1,2,3,4,5,6,7,8,9,0};
((McastService)channel.getMembershipService()).setDomain(domain);
DomainFilterInterceptor filter = new DomainFilterInterceptor();
filter.setDomain(domain);
channel.addInterceptor(filter);
return channel;
}