Examples of ReplicationTransmitter


Examples of org.apache.catalina.tribes.transport.ReplicationTransmitter

    }
   
    public void testKeepAliveCount() throws Exception {
        System.out.println("Setting keep alive count to 0");
        for (int i = 0; i < channels.length; i++) {
            ReplicationTransmitter t = (ReplicationTransmitter)channels[0].getChannelSender();
            t.getTransport().setKeepAliveCount(0);
        }
        sendMessages(1000,15000);
    }
View Full Code Here

Examples of org.apache.catalina.tribes.transport.ReplicationTransmitter

    }

    public void testKeepAliveTime() throws Exception {
        System.out.println("Setting keep alive count to 1 second");
        for (int i = 0; i < channels.length; i++) {
            ReplicationTransmitter t = (ReplicationTransmitter)channels[0].getChannelSender();
            t.getTransport().setKeepAliveTime(1000);
        }
        sendMessages(2000,15000);
    }
View Full Code Here

Examples of org.apache.catalina.tribes.transport.ReplicationTransmitter

        rx.setRxBufSize(43800);
        rx.setTxBufSize(25188);
        rx.setAutoBind(autoBind);

       
        ReplicationTransmitter ps = new ReplicationTransmitter();
        System.out.println("Creating transport class="+transport);
        MultiPointSender sender = (MultiPointSender)Class.forName(transport,true,ChannelCreator.class.getClassLoader()).newInstance();
        sender.setTimeout(acktimeout);
        sender.setMaxRetryAttempts(2);
        sender.setRxBufSize(43800);
        sender.setTxBufSize(25188);

        Iterator<Object> i = transportProperties.keySet().iterator();
        while ( i.hasNext() ) {
            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);
View Full Code Here

Examples of org.apache.catalina.tribes.transport.ReplicationTransmitter

        Parameter maxRetriesParam = getParameter(TribesConstants.MAX_RETRIES);
        int maxRetries = 10;
        if (maxRetriesParam != null) {
            maxRetries = Integer.parseInt((String) maxRetriesParam.getValue());
        }
        ReplicationTransmitter replicationTransmitter =
                (ReplicationTransmitter) channel.getChannelSender();
        MultiPointSender multiPointSender = replicationTransmitter.getTransport();
        multiPointSender.setMaxRetryAttempts(maxRetries);
    }
View Full Code Here

Examples of org.apache.catalina.tribes.transport.ReplicationTransmitter

        // Create the Sender object
        sender = (ChannelSender) Class.forName(className).newInstance();
       
        if (sender instanceof ReplicationTransmitter) {
           
            ReplicationTransmitter replicationTransmitter = (ReplicationTransmitter) sender;
           
            if (transport != null) {
                replicationTransmitter.setTransport((MultiPointSender)transport.getInternalObject());
            }
           
        } else {
            log.warn("Sender is not of type ReplicationTransmitter, no transport object will be set");
        }
View Full Code Here

Examples of org.apache.catalina.tribes.transport.ReplicationTransmitter

        }
        ObjectRecipe recipe = new ObjectRecipe(className, properties);
        recipe.allow(Option.IGNORE_MISSING_PROPERTIES);
        ChannelSender channelSender = (ChannelSender) recipe.create(cl);
        if (channelSender instanceof ReplicationTransmitter && transport != null) {
            ReplicationTransmitter replicationTransmitter = (ReplicationTransmitter) channelSender;
            replicationTransmitter.setTransport(transport.getTransport(cl));
        }
        return channelSender;
    }
View Full Code Here

Examples of org.apache.catalina.tribes.transport.ReplicationTransmitter

        rx.setRxBufSize(43800);
        rx.setTxBufSize(25188);
        rx.setAutoBind(autoBind);

       
        ReplicationTransmitter ps = new ReplicationTransmitter();
        System.out.println("Creating transport class="+transport);
        MultiPointSender sender = (MultiPointSender)Class.forName(transport,true,ChannelCreator.class.getClassLoader()).newInstance();
        sender.setTimeout(acktimeout);
        sender.setMaxRetryAttempts(2);
        sender.setRxBufSize(43800);
        sender.setTxBufSize(25188);

        Iterator i = transportProperties.keySet().iterator();
        while ( i.hasNext() ) {
            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);
View Full Code Here

Examples of org.apache.catalina.tribes.transport.ReplicationTransmitter

    @Test
    public void testKeepAliveCount() throws Exception {
        System.out.println("Setting keep alive count to 0");
        for (int i = 0; i < channels.length; i++) {
            ReplicationTransmitter t = (ReplicationTransmitter)channels[0].getChannelSender();
            t.getTransport().setKeepAliveCount(0);
        }
        sendMessages(1000,15000);
    }
View Full Code Here

Examples of org.apache.catalina.tribes.transport.ReplicationTransmitter

    @Test
    public void testKeepAliveTime() throws Exception {
        System.out.println("Setting keep alive count to 1 second");
        for (int i = 0; i < channels.length; i++) {
            ReplicationTransmitter t = (ReplicationTransmitter)channels[0].getChannelSender();
            t.getTransport().setKeepAliveTime(1000);
        }
        sendMessages(2000,15000);
    }
View Full Code Here

Examples of org.apache.catalina.tribes.transport.ReplicationTransmitter

    }
   
    public void testKeepAliveCount() throws Exception {
        System.out.println("Setting keep alive count to 0");
        for (int i = 0; i < channels.length; i++) {
            ReplicationTransmitter t = (ReplicationTransmitter)channels[0].getChannelSender();
            t.getTransport().setKeepAliveCount(0);
        }
        sendMessages(1000,15000);
    }
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.