Package org.jgroups.conf

Examples of org.jgroups.conf.ProtocolStackConfigurator


            assertEquals(expected, recv.size());
        }
    }

    private JChannel createSharedChannel(String singleton_name) throws ChannelException {
        ProtocolStackConfigurator config=ConfiguratorFactory.getStackConfigurator(channel_conf);
        List<ProtocolConfiguration> protocols=config.getProtocolStack();
        ProtocolConfiguration transport=protocols.get(0);
        transport.getProperties().put(Global.SINGLETON_NAME, singleton_name);
        return new JChannel(config);
    }
View Full Code Here


     */
    public JChannel(Object properties) throws ChannelException {
        if (properties == null)
            properties = DEFAULT_PROTOCOL_STACK;

        ProtocolStackConfigurator c=null;

        try {
            c=ConfiguratorFactory.getStackConfigurator(properties);
        }
        catch(Exception x) {
View Full Code Here

                    matrix[i][j]=0;
            }

            if(jg) {
                if(loopback) {
                    ProtocolStackConfigurator conf=ConfiguratorFactory.getStackConfigurator(props);
                    String tmp=conf.getProtocolStackString();
                    int index=tmp.indexOf(':');
                    props=LOOPBACK + tmp.substring(index);
                }
                channel=new JChannel(props);
                // System.out.println("props:\n" + channel.getProperties());
View Full Code Here

     */
    public JChannel(Object properties) throws ChannelException {
        if (properties == null)
            properties = DEFAULT_PROTOCOL_STACK;

        ProtocolStackConfigurator c=null;

        try {
            c=ConfiguratorFactory.getStackConfigurator(properties);
        }
        catch(Exception x) {
View Full Code Here

      checkStarted();

      if (properties == null)
         properties = JChannel.DEFAULT_PROTOCOL_STACK;

      ProtocolStackConfigurator config = null;

      try
      {
         ProtocolStackConfigurator c = ConfiguratorFactory.getStackConfigurator(properties);
         config = c;
      }
      catch (Exception x)
      {
         throw new ChannelException("unable to load protocol stack", x);
View Full Code Here

   }
 
   private ProtocolStackConfigurator addSingletonName(ProtocolStackConfigurator orig, String singletonName)
      throws ChannelException
   {
      ProtocolStackConfigurator result = null;
      try
      {
         ProtocolData[] protocols=orig.getProtocolStack();
         ProtocolData transport=protocols[0];
         ProtocolParameter singletonParam = new ProtocolParameter(Global.SINGLETON_NAME, singletonName);
View Full Code Here

     * {@inheritDoc}
     * @see org.jboss.msc.service.Service#start(org.jboss.msc.service.StartContext)
     */
    @Override
    public void start(StartContext context) throws StartException {
        ProtocolStackConfigurator configurator = load(this.resource);
        Defaults defaults = new Defaults();
        for (org.jgroups.conf.ProtocolConfiguration config: configurator.getProtocolStack()) {
            defaults.add(config.getProtocolName(), config.getProperties());
        }
        this.defaults = defaults;
    }
View Full Code Here

        context.asynchronous();
        this.executor.execute(task);
    }

    void start() throws StartException {
        ProtocolStackConfigurator configurator = load(ProtocolDefaultsService.this.resource);
        Defaults defaults = new Defaults();
        for (org.jgroups.conf.ProtocolConfiguration config: configurator.getProtocolStack()) {
            defaults.add(config.getProtocolName(), config.getProperties());
        }
        ProtocolDefaultsService.this.defaults = defaults;
    }
View Full Code Here

     */
    public JChannel(Object properties) throws ChannelException {
        if (properties == null)
            properties = DEFAULT_PROTOCOL_STACK;

        ProtocolStackConfigurator c=null;

        try {
            c=ConfiguratorFactory.getStackConfigurator(properties);
        }
        catch(Exception x) {
View Full Code Here

        for(JChannel ch: topics.values())
            Util.close(ch);
    }

    private static JChannel createSharedChannel(String singleton_name, String props) throws Exception {
        ProtocolStackConfigurator config=ConfiguratorFactory.getStackConfigurator(props);
        List<ProtocolConfiguration> protocols=config.getProtocolStack();
        ProtocolConfiguration transport=protocols.get(0);
        transport.getProperties().put(Global.SINGLETON_NAME, singleton_name);
        return new JChannel(config);
    }
View Full Code Here

TOP

Related Classes of org.jgroups.conf.ProtocolStackConfigurator

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.