Package com.swiftmq.swiftlet.auth
Class ResourceLimitGroup
java.lang.Object
com.swiftmq.swiftlet.auth.ResourceLimitGroup
A 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
ConstructorsConstructorDescriptionResourceLimitGroup
(String name, int maxConnections, int maxSessions, int maxTempQueues, int maxProducers, int maxConsumers) Creates a new ResourceLimitGroup. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Decrements the number of consumers in usevoid
Decrements the number of producers in usevoid
Decrements the number of sessions in usevoid
Decrements the number of temp.int
Returns the number of consumers in useint
Returns the max.int
Returns the max.int
Returns the max.int
Returns the max.int
Returns the max.getName()
Returns the group nameint
Returns the number of producers in useint
Returns the number of sessions in useint
Returns the number of temp.void
Increments the number of consumers in usevoid
Increments the number of producers in usevoid
Increments the number of sessions in usevoid
Increments the number of temp.void
setMaxConnections
(int maxConnections) Set the max.void
setMaxConsumers
(int maxConsumers) Set the max.void
setMaxProducers
(int maxProducers) Set the max.void
setMaxSessions
(int maxSessions) Set the max.void
setMaxTempQueues
(int maxTempQueues) Set the max.toString()
void
verifyConnectionLimit
(int n)
-
Constructor Details
-
ResourceLimitGroup
public ResourceLimitGroup(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 Details
-
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
- 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
Increments 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
Increments 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
Increments 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
Increments 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
-