Package com.swiftmq.swiftlet.auth
Class ResourceLimitGroup
- java.lang.Object
-
- com.swiftmq.swiftlet.auth.ResourceLimitGroup
-
public class ResourceLimitGroup extends java.lang.ObjectA ResourceLimitGroup contains the maximum values for connections, sessions per connection, temp. queues/topics per connection, producers and consumers per connection a user can obtain from a SwiftMQ router.- Author:
- IIT GmbH, Bremen/Germany, Copyright (c) 2000-2004, All Rights Reserved
-
-
Constructor Summary
Constructors Constructor Description ResourceLimitGroup(java.lang.String name, int maxConnections, int maxSessions, int maxTempQueues, int maxProducers, int maxConsumers)Creates a new ResourceLimitGroup.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecConsumers()Decrements the number of consumers in usevoiddecProducers()Decrements the number of producers in usevoiddecSessions()Decrements the number of sessions in usevoiddecTempQueues()Decrements the number of temp.intgetConsumers()Returns the number of consumers in useintgetMaxConnections()Returns the max.intgetMaxConsumers()Returns the max.intgetMaxProducers()Returns the max.intgetMaxSessions()Returns the max.intgetMaxTempQueues()Returns the max.java.lang.StringgetName()Returns the group nameintgetProducers()Returns the number of producers in useintgetSessions()Returns the number of sessions in useintgetTempQueues()Returns the number of temp.voidincConsumers()Increments the number of consumers in usevoidincProducers()Increments the number of producers in usevoidincSessions()Increments the number of sessions in usevoidincTempQueues()Increments the number of temp.voidsetMaxConnections(int maxConnections)Set the max.voidsetMaxConsumers(int maxConsumers)Set the max.voidsetMaxProducers(int maxProducers)Set the max.voidsetMaxSessions(int maxSessions)Set the max.voidsetMaxTempQueues(int maxTempQueues)Set the max.java.lang.StringtoString()voidverifyConnectionLimit(int n)
-
-
-
Constructor Detail
-
ResourceLimitGroup
public ResourceLimitGroup(java.lang.String name, int maxConnections, int maxSessions, int maxTempQueues, int maxProducers, int maxConsumers)Creates a new ResourceLimitGroup.- Parameters:
name- Name of the groupmaxConnections- max. connectionsmaxSessions- max. sessionsmaxTempQueues- max. temp. queues/topicsmaxProducers- max. producersmaxConsumers- max. consumers
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the group name- Returns:
- group name
-
getMaxConnections
public int getMaxConnections()
Returns the max. connections- Returns:
- max. connections
-
setMaxConnections
public void setMaxConnections(int maxConnections)
Set the max. sessions- Parameters:
maxConnections- max. connections
-
verifyConnectionLimit
public void verifyConnectionLimit(int n) throws ResourceLimitException- Throws:
ResourceLimitException
-
getMaxSessions
public int getMaxSessions()
Returns the max. sessions- Returns:
- max. sessions
-
setMaxSessions
public void setMaxSessions(int maxSessions)
Set the max. sessions- Parameters:
maxSessions- max. sessions
-
getMaxTempQueues
public int getMaxTempQueues()
Returns the max. temp queues/topics- Returns:
- max. temp queues/topics
-
setMaxTempQueues
public void setMaxTempQueues(int maxTempQueues)
Set the max. temp queues/topics- Parameters:
maxTempQueues- max. temp queues/topics
-
getMaxProducers
public int getMaxProducers()
Returns the max. producers- Returns:
- max. producers
-
setMaxProducers
public void setMaxProducers(int maxProducers)
Set the max. producers- Parameters:
maxProducers- max. producers
-
getMaxConsumers
public int getMaxConsumers()
Returns the max. consumers- Returns:
- max. consumers
-
setMaxConsumers
public void setMaxConsumers(int maxConsumers)
Set the max. consumers- Parameters:
maxConsumers- max. consumers
-
incSessions
public void incSessions() throws ResourceLimitExceptionIncrements the number of sessions in use- Throws:
ResourceLimitException- if max. sessions is exceeded
-
decSessions
public void decSessions()
Decrements the number of sessions in use
-
getSessions
public int getSessions()
Returns the number of sessions in use- Returns:
- number of sessions in use
-
incTempQueues
public void incTempQueues() throws ResourceLimitExceptionIncrements the number of temp. queues/topics in use- Throws:
ResourceLimitException- if max. temp. queues/topics is exceeded
-
decTempQueues
public void decTempQueues()
Decrements the number of temp. queues/topics in use
-
getTempQueues
public int getTempQueues()
Returns the number of temp. queues/topics in use- Returns:
- number of temp. queues/topics in use
-
incProducers
public void incProducers() throws ResourceLimitExceptionIncrements the number of producers in use- Throws:
ResourceLimitException- if max. producers is exceeded
-
decProducers
public void decProducers()
Decrements the number of producers in use
-
getProducers
public int getProducers()
Returns the number of producers in use- Returns:
- number of producers in use
-
incConsumers
public void incConsumers() throws ResourceLimitExceptionIncrements the number of consumers in use- Throws:
ResourceLimitException- if max. consumers is exceeded
-
decConsumers
public void decConsumers()
Decrements the number of consumers in use
-
getConsumers
public int getConsumers()
Returns the number of consumers in use- Returns:
- number of consumers in use
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-