Package com.swiftmq.impl.auth.standard
Class AuthenticationSwiftletImpl
- java.lang.Object
-
- com.swiftmq.swiftlet.Swiftlet
-
- com.swiftmq.swiftlet.auth.AuthenticationSwiftlet
-
- com.swiftmq.impl.auth.standard.AuthenticationSwiftletImpl
-
public class AuthenticationSwiftletImpl extends AuthenticationSwiftlet
-
-
Field Summary
-
Fields inherited from class com.swiftmq.swiftlet.Swiftlet
STATE_ACTIVE, STATE_INACTIVE, STATE_STANDBY
-
-
Constructor Summary
Constructors Constructor Description AuthenticationSwiftletImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addTopicAuthenticationDelegate(AuthenticationDelegate authenticationDelegate)
protected java.lang.Object
createLoginId(java.lang.String userName)
Creates a unique login id.protected ResourceLimitGroup
createResourceLimitGroup(java.lang.String userName)
Creates a resource limit groupjava.lang.String
getPassword(java.lang.String userName)
Returns a user's passwordvoid
logout(java.lang.String userName, java.lang.Object loginId)
Log out of a uservoid
removeTopicAuthenticationDelegate(AuthenticationDelegate authenticationDelegate)
protected void
shutdown()
Stop this Swiftlet.protected void
startup(Configuration config)
Start this Swiftlet.void
verifyHostLogin(java.lang.String userName, java.lang.String hostname)
Verifies if the user is granted to login from the given host.void
verifyQueueBrowserCreation(java.lang.String queueName, java.lang.Object loginId)
Verifies if the user is granted to create a browser at the queuevoid
verifyQueueCreation(java.lang.Object loginId)
Verifies if the user is granted to create a queuevoid
verifyQueueReceiverSubscription(java.lang.String queueName, java.lang.Object loginId)
Verifies if the user is granted to subscribe to the queue as a receivervoid
verifyQueueSenderSubscription(java.lang.String queueName, java.lang.Object loginId)
Verifies if the user is granted to subscribe to the queue as a sendervoid
verifySetClientId(java.lang.Object loginId)
Verifies if the user is granted to set a new client idvoid
verifyTopicDurableSubscriberCreation(java.lang.String topicName, java.lang.Object loginId)
Verifies if the user is granted to create a durable subscriber at the topicvoid
verifyTopicReceiverSubscription(java.lang.String topicName, java.lang.Object loginId)
Verifies if the user is granted to subscribe to a topic as a receivervoid
verifyTopicSenderSubscription(java.lang.String topicName, java.lang.Object loginId)
Verifies if the user is granted to subscribe to a topic as a sender-
Methods inherited from class com.swiftmq.swiftlet.auth.AuthenticationSwiftlet
createActiveLogin
-
Methods inherited from class com.swiftmq.swiftlet.Swiftlet
getName, getStartupTime, getState, isSnapshotAvailable, resume, setStartupTime, standby
-
-
-
-
Method Detail
-
getPassword
public java.lang.String getPassword(java.lang.String userName) throws AuthenticationException
Description copied from class:AuthenticationSwiftlet
Returns a user's password- Specified by:
getPassword
in classAuthenticationSwiftlet
- Parameters:
userName
- username- Throws:
AuthenticationException
- if the user is unknown
-
verifyHostLogin
public void verifyHostLogin(java.lang.String userName, java.lang.String hostname) throws AuthenticationException, ResourceLimitException
Description copied from class:AuthenticationSwiftlet
Verifies if the user is granted to login from the given host.- Specified by:
verifyHostLogin
in classAuthenticationSwiftlet
- Parameters:
userName
- usernamehostname
- hostname- Throws:
AuthenticationException
- if he is not grantedResourceLimitException
- if the max number of concurrent connections for this user has been reached
-
logout
public void logout(java.lang.String userName, java.lang.Object loginId)
Description copied from class:AuthenticationSwiftlet
Log out of a user- Specified by:
logout
in classAuthenticationSwiftlet
- Parameters:
userName
- user nameloginId
- login id
-
verifySetClientId
public void verifySetClientId(java.lang.Object loginId) throws AuthenticationException
Description copied from class:AuthenticationSwiftlet
Verifies if the user is granted to set a new client id- Specified by:
verifySetClientId
in classAuthenticationSwiftlet
- Parameters:
loginId
- login id- Throws:
AuthenticationException
- if he is not granted
-
verifyQueueCreation
public void verifyQueueCreation(java.lang.Object loginId) throws AuthenticationException
Description copied from class:AuthenticationSwiftlet
Verifies if the user is granted to create a queue- Specified by:
verifyQueueCreation
in classAuthenticationSwiftlet
- Parameters:
loginId
- login id- Throws:
AuthenticationException
- if he is not granted
-
verifyQueueSenderSubscription
public void verifyQueueSenderSubscription(java.lang.String queueName, java.lang.Object loginId) throws AuthenticationException
Description copied from class:AuthenticationSwiftlet
Verifies if the user is granted to subscribe to the queue as a sender- Specified by:
verifyQueueSenderSubscription
in classAuthenticationSwiftlet
- Parameters:
queueName
- queue nameloginId
- login id- Throws:
AuthenticationException
- if he is not granted
-
verifyQueueReceiverSubscription
public void verifyQueueReceiverSubscription(java.lang.String queueName, java.lang.Object loginId) throws AuthenticationException
Description copied from class:AuthenticationSwiftlet
Verifies if the user is granted to subscribe to the queue as a receiver- Specified by:
verifyQueueReceiverSubscription
in classAuthenticationSwiftlet
- Parameters:
queueName
- queue nameloginId
- login id- Throws:
AuthenticationException
- if he is not granted
-
verifyQueueBrowserCreation
public void verifyQueueBrowserCreation(java.lang.String queueName, java.lang.Object loginId) throws AuthenticationException
Description copied from class:AuthenticationSwiftlet
Verifies if the user is granted to create a browser at the queue- Specified by:
verifyQueueBrowserCreation
in classAuthenticationSwiftlet
- Parameters:
queueName
- queue nameloginId
- login id- Throws:
AuthenticationException
- if he is not granted
-
verifyTopicSenderSubscription
public void verifyTopicSenderSubscription(java.lang.String topicName, java.lang.Object loginId) throws AuthenticationException
Description copied from class:AuthenticationSwiftlet
Verifies if the user is granted to subscribe to a topic as a sender- Specified by:
verifyTopicSenderSubscription
in classAuthenticationSwiftlet
- Parameters:
topicName
- topic nameloginId
- login id- Throws:
AuthenticationException
- if he is not granted
-
verifyTopicReceiverSubscription
public void verifyTopicReceiverSubscription(java.lang.String topicName, java.lang.Object loginId) throws AuthenticationException
Description copied from class:AuthenticationSwiftlet
Verifies if the user is granted to subscribe to a topic as a receiver- Specified by:
verifyTopicReceiverSubscription
in classAuthenticationSwiftlet
- Parameters:
topicName
- topic nameloginId
- login id- Throws:
AuthenticationException
- if he is not granted
-
verifyTopicDurableSubscriberCreation
public void verifyTopicDurableSubscriberCreation(java.lang.String topicName, java.lang.Object loginId) throws AuthenticationException
Description copied from class:AuthenticationSwiftlet
Verifies if the user is granted to create a durable subscriber at the topic- Specified by:
verifyTopicDurableSubscriberCreation
in classAuthenticationSwiftlet
- Parameters:
topicName
- topic nameloginId
- login id- Throws:
AuthenticationException
- if he is not granted
-
addTopicAuthenticationDelegate
public void addTopicAuthenticationDelegate(AuthenticationDelegate authenticationDelegate)
- Specified by:
addTopicAuthenticationDelegate
in classAuthenticationSwiftlet
-
removeTopicAuthenticationDelegate
public void removeTopicAuthenticationDelegate(AuthenticationDelegate authenticationDelegate)
- Specified by:
removeTopicAuthenticationDelegate
in classAuthenticationSwiftlet
-
createLoginId
protected java.lang.Object createLoginId(java.lang.String userName)
Description copied from class:AuthenticationSwiftlet
Creates a unique login id.- Specified by:
createLoginId
in classAuthenticationSwiftlet
- Parameters:
userName
- user name- Returns:
- login id
-
createResourceLimitGroup
protected ResourceLimitGroup createResourceLimitGroup(java.lang.String userName)
Description copied from class:AuthenticationSwiftlet
Creates a resource limit group- Specified by:
createResourceLimitGroup
in classAuthenticationSwiftlet
- Parameters:
userName
- user name- Returns:
- resource limit group
-
startup
protected void startup(Configuration config) throws SwiftletException
Description copied from class:Swiftlet
Start this Swiftlet. Called from the SwiftletManager during router start. The Swiftlet configuration is passed as parameter.- Specified by:
startup
in classSwiftlet
- Parameters:
config
- Swiftlet configuration.- Throws:
SwiftletException
- on error during startup.
-
shutdown
protected void shutdown() throws SwiftletException
Description copied from class:Swiftlet
Stop this Swiftlet. Called from the SwiftletManager during router shutdown.- Specified by:
shutdown
in classSwiftlet
- Throws:
SwiftletException
- on error during shutdown.
-
-