Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2009 Red Hat, Inc.
   *  Red Hat licenses this file to you under the Apache License, version
   *  2.0 (the "License"); you may not use this file except in compliance
   *  with the License.  You may obtain a copy of the License at
   *     http://www.apache.org/licenses/LICENSE-2.0
   *  Unless required by applicable law or agreed to in writing, software
   *  distributed under the License is distributed on an "AS IS" BASIS,
   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
  *  implied.  See the License for the specific language governing
  *  permissions and limitations under the License.
  */
 
 package org.hornetq.jms.server.config.impl;
 
 import java.util.List;
 
This class contains the configuration properties of a connection factory. It is also persisted on the journal at the time of management is used to created a connection factory and set to store. Every property on this class has to be also set through encoders through EncodingSupport implementation at this class.

Author(s):
Jeff Mesnil
 
 {
    // Constants -----------------------------------------------------
 
    // Attributes ----------------------------------------------------
 
    private String name;
    
    private boolean persisted;
 
    private String[] bindings;
 
    private List<StringconnectorNames;
    
    private String discoveryGroupName;
 
    private String clientID = null;
 
    private boolean ha = .;
 
 
 
 
 
 
    
 
 
 
 
 
 
 
 
 
    private boolean autoGroup = .;
 
 
 
 
 
 
   private String groupID = null;
   // Static --------------------------------------------------------
   // Constructors --------------------------------------------------

   
To be used on persistence only
   {
   }
   public ConnectionFactoryConfigurationImpl(final String name,
                                             final boolean ha,
                                             final List<StringconnectorNames,
                                             final String... bindings)
   {
      this(namehabindings);
      this. = connectorNames;
   }
   public ConnectionFactoryConfigurationImpl(final String namefinal boolean hafinal String... bindings)
   {
      this. = name;
      this. = ha;
      this. = new String[bindings.length];
      System.arraycopy(bindings, 0, this., 0, bindings.length);
   }
   // ConnectionFactoryConfiguration implementation -----------------
   public String[] getBindings()
   {
      return ;
   }
   public void setBindings(final String[] bindings)
   {
      this. = bindings;
   }
   public String getName()
   {
      return ;
   }
   
   public boolean isPersisted()
   {
      return ;
   }

   

Returns:
the discoveryGroupName
   {
      return ;
   }

   

Parameters:
discoveryGroupName the discoveryGroupName to set
   public void setDiscoveryGroupName(String discoveryGroupName)
   {
      this. = discoveryGroupName;
   }
   public List<StringgetConnectorNames()
   {
      return ;
   }
   public void setConnectorNames(final List<StringconnectorNames)
   {
      this. = connectorNames;
   }
   public boolean isHA()
   {
      return ;
   }
   public void setHA(final boolean ha)
   {
      this. = ha;
   }
   public String getClientID()
   {
      return ;
   }
   public void setClientID(final String clientID)
   {
      this. = clientID;
   }
   public long getClientFailureCheckPeriod()
   {
      return ;
   }
   public void setClientFailureCheckPeriod(final long clientFailureCheckPeriod)
   {
      this. = clientFailureCheckPeriod;
   }
   public long getConnectionTTL()
   {
      return ;
   }
   public void setConnectionTTL(final long connectionTTL)
   {
      this. = connectionTTL;
   }
   public long getCallTimeout()
   {
      return ;
   }
   public void setCallTimeout(final long callTimeout)
   {
      this. = callTimeout;
   }
   public long getCallFailoverTimeout()
   {
      return ;
   }
   public void setCallFailoverTimeout(long callFailoverTimeout)
   {
      this. = callFailoverTimeout;
   }
   public boolean isCacheLargeMessagesClient()
   {
      return ;
   }
   public void setCacheLargeMessagesClient(final boolean cacheLargeMessagesClient)
   {
      this. = cacheLargeMessagesClient;
   }
   public int getMinLargeMessageSize()
   {
      return ;
   }
   public void setMinLargeMessageSize(final int minLargeMessageSize)
   {
      this. = minLargeMessageSize;
   }
   public boolean isCompressLargeMessages()
   {
      return ;
   }
   public void setCompressLargeMessages(final boolean compress)
   {
      this. = compress;
   }
   public int getConsumerWindowSize()
   {
      return ;
   }
   public void setConsumerWindowSize(final int consumerWindowSize)
   {
      this. = consumerWindowSize;
   }
   public int getConsumerMaxRate()
   {
      return ;
   }
   public void setConsumerMaxRate(final int consumerMaxRate)
   {
      this. = consumerMaxRate;
   }
   public int getConfirmationWindowSize()
   {
      return ;
   }
   public void setConfirmationWindowSize(final int confirmationWindowSize)
   {
      this. = confirmationWindowSize;
   }
   public int getProducerMaxRate()
   {
      return ;
   }
   public void setProducerMaxRate(final int producerMaxRate)
   {
      this. = producerMaxRate;
   }
   public int getProducerWindowSize()
   {
      return ;
   }
   public void setProducerWindowSize(final int producerWindowSize)
   {
      this. = producerWindowSize;
   }
   public boolean isBlockOnAcknowledge()
   {
      return ;
   }
   public void setBlockOnAcknowledge(final boolean blockOnAcknowledge)
   {
      this. = blockOnAcknowledge;
   }
   public boolean isBlockOnDurableSend()
   {
      return ;
   }
   public void setBlockOnDurableSend(final boolean blockOnDurableSend)
   {
      this. = blockOnDurableSend;
   }
   public boolean isBlockOnNonDurableSend()
   {
      return ;
   }
   public void setBlockOnNonDurableSend(final boolean blockOnNonDurableSend)
   {
      this. = blockOnNonDurableSend;
   }
   public boolean isAutoGroup()
   {
      return ;
   }
   public void setAutoGroup(final boolean autoGroup)
   {
      this. = autoGroup;
   }
   public boolean isPreAcknowledge()
   {
      return ;
   }
   public void setPreAcknowledge(final boolean preAcknowledge)
   {
      this. = preAcknowledge;
   }
   {
      return ;
   }
   public void setLoadBalancingPolicyClassName(final String loadBalancingPolicyClassName)
   {
      this. = loadBalancingPolicyClassName;
   }
   public int getTransactionBatchSize()
   {
      return ;
   }
   public void setTransactionBatchSize(final int transactionBatchSize)
   {
      this. = transactionBatchSize;
   }
   public int getDupsOKBatchSize()
   {
      return ;
   }
   public void setDupsOKBatchSize(final int dupsOKBatchSize)
   {
      this. = dupsOKBatchSize;
   }
   public long getInitialWaitTimeout()
   {
      return ;
   }
   public void setInitialWaitTimeout(final long initialWaitTimeout)
   {
      this. = initialWaitTimeout;
   }
   public boolean isUseGlobalPools()
   {
      return ;
   }
   public void setUseGlobalPools(final boolean useGlobalPools)
   {
      this. = useGlobalPools;
   }
   {
      return ;
   }
   public void setScheduledThreadPoolMaxSize(final int scheduledThreadPoolMaxSize)
   {
      this. = scheduledThreadPoolMaxSize;
   }
   public int getThreadPoolMaxSize()
   {
      return ;
   }
   public void setThreadPoolMaxSize(final int threadPoolMaxSize)
   {
      this. = threadPoolMaxSize;
   }
   public long getRetryInterval()
   {
      return ;
   }
   public void setRetryInterval(final long retryInterval)
   {
      this. = retryInterval;
   }
   public double getRetryIntervalMultiplier()
   {
      return ;
   }
   public void setRetryIntervalMultiplier(final double retryIntervalMultiplier)
   {
      this. = retryIntervalMultiplier;
   }
   public long getMaxRetryInterval()
   {
      return ;
   }
   public void setMaxRetryInterval(final long maxRetryInterval)
   {
      this. = maxRetryInterval;
   }
   public int getReconnectAttempts()
   {
      return ;
   }
   public void setReconnectAttempts(final int reconnectAttempts)
   {
      this. = reconnectAttempts;
   }
   public boolean isFailoverOnInitialConnection()
   {
      return ;
   }
   public void setFailoverOnInitialConnection(final boolean failover)
   {
       = failover;
   }
   public String getGroupID()
   {
      return ;
   }
   public void setGroupID(final String groupID)
   {
      this. = groupID;
   }
   // Encoding Support Implementation --------------------------------------------------------------
   /* (non-Javadoc)
    * @see org.hornetq.core.journal.EncodingSupport#decode(org.hornetq.api.core.HornetQBuffer)
    */
   public void decode(final HornetQBuffer buffer)
   {
       = true;
      
       = buffer.readSimpleString().toString();
       = BufferHelper.readNullableSimpleStringAsString(buffer);
      
      int nConnectors = buffer.readInt();
      if (nConnectors > 0)
      {
          = new ArrayList<String>(nConnectors);
         for (int i = 0; i < nConnectorsi++)
         {
            SimpleString str = buffer.readSimpleString();
            
            .add(str.toString());
         }
      }
      
       = buffer.readBoolean();
       = BufferHelper.readNullableSimpleStringAsString(buffer);
       = buffer.readLong();
       = buffer.readLong();
       = buffer.readLong();
       = buffer.readBoolean();
       = buffer.readInt();
       = buffer.readInt();
       = buffer.readInt();
       = buffer.readInt();
       = buffer.readInt();
       = buffer.readInt();
       = buffer.readBoolean();
       = buffer.readBoolean();
       = buffer.readBoolean();
       = buffer.readBoolean();
       = buffer.readBoolean();
       = buffer.readInt();
       = buffer.readInt();
       = buffer.readLong();
       = buffer.readBoolean();
       = buffer.readInt();
       = buffer.readInt();
       = buffer.readLong();
       = buffer.readDouble();
       = buffer.readLong();
       = buffer.readInt();
      
       = buffer.readBoolean();
       = BufferHelper.readNullableSimpleStringAsString(buffer);
       = JMSFactoryType.valueOf(buffer.readInt());
   }
   /* (non-Javadoc)
    * @see org.hornetq.core.journal.EncodingSupport#encode(org.hornetq.api.core.HornetQBuffer)
    */
   public void encode(final HornetQBuffer buffer)
   {
       = true;
      
      BufferHelper.writeAsSimpleString(buffer);
      BufferHelper.writeAsNullableSimpleString(buffer);
      
      if (this. == null)
      {
         buffer.writeInt(0);
      }
      else
      {
         buffer.writeInt(.size());
         for (String tc : )
         {
            BufferHelper.writeAsSimpleString(buffertc);
         }
      }
      
      buffer.writeBoolean();
      BufferHelper.writeAsNullableSimpleString(buffer);
      buffer.writeLong();
      buffer.writeLong();
      buffer.writeInt();
      buffer.writeInt();
      buffer.writeInt();
      buffer.writeInt();
      buffer.writeInt();
      buffer.writeInt();
      buffer.writeBoolean();
      buffer.writeBoolean();
      buffer.writeBoolean();
      buffer.writeBoolean();
      BufferHelper.writeAsSimpleString(buffer);
      buffer.writeInt();
      buffer.writeInt();
      buffer.writeLong();
      buffer.writeBoolean();
      buffer.writeInt();
      buffer.writeLong();
      buffer.writeLong();
      buffer.writeInt();
      
      BufferHelper.writeAsNullableSimpleString(buffer);
      buffer.writeInt(.intValue());
   }
   /* (non-Javadoc)
    * @see org.hornetq.core.journal.EncodingSupport#getEncodeSize()
    */
   public int getEncodeSize()
   {
      int size = BufferHelper.sizeOfSimpleString() +
      
      size += .;
      if (this. != null)
      {
         for (String tc : )
         {
            size += BufferHelper.sizeOfSimpleString(tc); 
         }
      }
      
      size += BufferHelper.sizeOfNullableSimpleString() +
      
              . + 
              // ha
              . +
              // clientFailureCheckPeriod
              . +
              // connectionTTL
              . +
              // callTimeout
              . +
              // cacheLargeMessagesClient
              . +
              // minLargeMessageSize
              . +
              // consumerWindowSize
              . +
              // consumerMaxRate
              . +
              // confirmationWindowSize
              . +
              // producerWindowSize
              . +
              // producerMaxRate
              . +
              // blockOnAcknowledge
              . +
              // blockOnDurableSend
              . +
              // blockOnNonDurableSend
              . +
              // autoGroup
              . +
              // preAcknowledge
              BufferHelper.sizeOfSimpleString() +
              . +
              // transactionBatchSize
              . +
              // dupsOKBatchSize
              . +
              // initialWaitTimeout
              . +
              // useGlobalPools
              . +
              // scheduledThreadPoolMaxSize
              . +
              // threadPoolMaxSize
              . +
              // retryInterval
              . +
              // retryIntervalMultiplier
              . +
              // maxRetryInterval
              . +
              // reconnectAttempts
              . +
              // failoverOnInitialConnection
              
              . + 
              // compress-large-message
              BufferHelper.sizeOfNullableSimpleString() +
              .// factoryType
      return size;
   }
   public void setFactoryType(final JMSFactoryType factoryType)
   {
      this. = factoryType;
   }
   {
      return ;
   }
   // Public --------------------------------------------------------
   // Package protected ---------------------------------------------
   // Protected -----------------------------------------------------
   // Private -------------------------------------------------------
   // Inner classes -------------------------------------------------
New to GrepCode? Check out our FAQ X