Class ClientAdapter
- java.lang.Object
-
- org.keycloak.models.cache.infinispan.ClientAdapter
-
- All Implemented Interfaces:
CachedObject
,ClientModel
,ClientScopeModel
,OrderedModel
,ProtocolMapperContainerModel
,RoleContainerModel
,ScopeContainerModel
public class ClientAdapter extends Object implements ClientModel, CachedObject
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.keycloak.models.ClientModel
ClientModel.ClientCreationEvent, ClientModel.ClientIdChangeEvent, ClientModel.ClientProtocolUpdatedEvent, ClientModel.ClientRemovedEvent, ClientModel.ClientUpdatedEvent, ClientModel.SearchableFields
-
Nested classes/interfaces inherited from interface org.keycloak.models.ClientScopeModel
ClientScopeModel.ClientScopeRemovedEvent
-
Nested classes/interfaces inherited from interface org.keycloak.models.OrderedModel
OrderedModel.OrderedModelComparator<OM extends OrderedModel>
-
Nested classes/interfaces inherited from interface org.keycloak.models.RoleContainerModel
RoleContainerModel.RoleRemovedEvent
-
-
Field Summary
Fields Modifier and Type Field Description protected CachedClient
cached
protected RealmModel
cachedRealm
protected RealmCacheSession
cacheSession
protected boolean
invalidated
protected ClientModel
updated
-
Fields inherited from interface org.keycloak.models.ClientModel
LOGO_URI, POLICY_URI, PRIVATE_KEY, PUBLIC_KEY, TOS_URI, X509CERTIFICATE
-
Fields inherited from interface org.keycloak.models.ClientScopeModel
CONSENT_SCREEN_TEXT, DISPLAY_ON_CONSENT_SCREEN, DYNAMIC_SCOPE_REGEXP, GUI_ORDER, INCLUDE_IN_TOKEN_SCOPE, IS_DYNAMIC_SCOPE
-
-
Constructor Summary
Constructors Constructor Description ClientAdapter(RealmModel cachedRealm, CachedClient cached, RealmCacheSession cacheSession)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addClientScope(ClientScopeModel clientScope, boolean defaultScope)
Add clientScope with this client.void
addClientScopes(Set<ClientScopeModel> clientScopes, boolean defaultScope)
Add clientScopes with this client.void
addDefaultRole(String name)
Deprecated.ProtocolMapperModel
addProtocolMapper(ProtocolMapperModel model)
void
addRedirectUri(String redirectUri)
RoleModel
addRole(String name)
RoleModel
addRole(String id, String name)
void
addScopeMapping(RoleModel role)
void
addWebOrigin(String webOrigin)
void
deleteScopeMapping(RoleModel role)
boolean
equals(Object o)
String
getAttribute(String name)
Map<String,String>
getAttributes()
String
getAuthenticationFlowBindingOverride(String name)
Get authentication flow binding override for this client.Map<String,String>
getAuthenticationFlowBindingOverrides()
String
getBaseUrl()
long
getCacheTimestamp()
String
getClientAuthenticatorType()
String
getClientId()
Returns client ID as defined by the user.Map<String,ClientScopeModel>
getClientScopes(boolean defaultScope)
Return all default scopes (if 'defaultScope' is true) or all optional scopes (if 'defaultScope' is false) linked with this clientStream<String>
getDefaultRolesStream()
Deprecated.String
getDescription()
String
getId()
Returns client internal ID (UUID).String
getManagementUrl()
String
getName()
int
getNodeReRegistrationTimeout()
int
getNotBefore()
Time in seconds since epocString
getProtocol()
ProtocolMapperModel
getProtocolMapperById(String id)
ProtocolMapperModel
getProtocolMapperByName(String protocol, String name)
Stream<ProtocolMapperModel>
getProtocolMappersStream()
Returns protocol mappers as a stream.RealmModel
getRealm()
Stream<RoleModel>
getRealmScopeMappingsStream()
From the scope mappings returned byScopeContainerModel.getScopeMappingsStream()
returns only those that belong to the realm that owns this scope container.Set<String>
getRedirectUris()
Map<String,Integer>
getRegisteredNodes()
String
getRegistrationToken()
RoleModel
getRole(String name)
Stream<RoleModel>
getRolesStream()
Returns available roles as a stream.Stream<RoleModel>
getRolesStream(Integer first, Integer max)
Returns available roles as a stream.String
getRootUrl()
Stream<RoleModel>
getScopeMappingsStream()
Returns scope mappings for this scope container as a stream.String
getSecret()
Set<String>
getWebOrigins()
boolean
hasDirectScope(RoleModel role)
Returnstrue
, if this object has the given role directly in its scope.int
hashCode()
boolean
hasScope(RoleModel role)
Returnstrue
, if this object has the given role directly or indirectly in its scope,false
otherwise.void
invalidate()
boolean
isAlwaysDisplayInConsole()
boolean
isBearerOnly()
boolean
isConsentRequired()
boolean
isDirectAccessGrantsEnabled()
boolean
isEnabled()
boolean
isFrontchannelLogout()
boolean
isFullScopeAllowed()
boolean
isImplicitFlowEnabled()
boolean
isPublicClient()
boolean
isServiceAccountsEnabled()
boolean
isStandardFlowEnabled()
boolean
isSurrogateAuthRequired()
protected boolean
isUpdated()
void
registerNode(String nodeHost, int registrationTime)
Register node or just update the 'lastReRegistration' time if this node is already registeredvoid
removeAttribute(String name)
void
removeAuthenticationFlowBindingOverride(String name)
void
removeClientScope(ClientScopeModel clientScope)
void
removeDefaultRoles(String... defaultRoles)
Deprecated.void
removeProtocolMapper(ProtocolMapperModel mapping)
void
removeRedirectUri(String redirectUri)
boolean
removeRole(RoleModel role)
void
removeWebOrigin(String webOrigin)
Stream<RoleModel>
searchForRolesStream(String search, Integer first, Integer max)
Searches roles by the given name.void
setAlwaysDisplayInConsole(boolean alwaysDisplayInConsole)
void
setAttribute(String name, String value)
void
setAuthenticationFlowBindingOverride(String name, String value)
void
setBaseUrl(String url)
void
setBearerOnly(boolean only)
void
setClientAuthenticatorType(String clientAuthenticatorType)
void
setClientId(String clientId)
void
setConsentRequired(boolean consentRequired)
void
setDescription(String description)
void
setDirectAccessGrantsEnabled(boolean directAccessGrantsEnabled)
void
setEnabled(boolean enabled)
void
setFrontchannelLogout(boolean flag)
void
setFullScopeAllowed(boolean value)
void
setImplicitFlowEnabled(boolean implicitFlowEnabled)
void
setManagementUrl(String url)
void
setName(String name)
void
setNodeReRegistrationTimeout(int timeout)
void
setNotBefore(int notBefore)
void
setProtocol(String protocol)
void
setPublicClient(boolean flag)
void
setRedirectUris(Set<String> redirectUris)
void
setRegistrationToken(String registrationToken)
void
setRootUrl(String url)
void
setSecret(String secret)
void
setServiceAccountsEnabled(boolean serviceAccountsEnabled)
void
setStandardFlowEnabled(boolean standardFlowEnabled)
void
setSurrogateAuthRequired(boolean surrogateAuthRequired)
void
setWebOrigins(Set<String> webOrigins)
String
toString()
void
unregisterNode(String nodeHost)
void
updateClient()
Notifies other providers that this client has been updated.void
updateProtocolMapper(ProtocolMapperModel mapping)
boolean
validateSecret(String secret)
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.keycloak.models.ClientModel
getConsentScreenText, getDynamicClientScope, isDisplayOnConsentScreen
-
Methods inherited from interface org.keycloak.models.ClientScopeModel
getDynamicScopeRegexp, getGuiOrder, isDynamicScope, isIncludeInTokenScope, setConsentScreenText, setDisplayOnConsentScreen, setGuiOrder, setIncludeInTokenScope, setIsDynamicScope
-
Methods inherited from interface org.keycloak.models.RoleContainerModel
getDefaultRoles, updateDefaultRoles
-
-
-
-
Field Detail
-
cacheSession
protected RealmCacheSession cacheSession
-
cachedRealm
protected RealmModel cachedRealm
-
updated
protected ClientModel updated
-
cached
protected CachedClient cached
-
invalidated
protected boolean invalidated
-
-
Constructor Detail
-
ClientAdapter
public ClientAdapter(RealmModel cachedRealm, CachedClient cached, RealmCacheSession cacheSession)
-
-
Method Detail
-
invalidate
public void invalidate()
-
isUpdated
protected boolean isUpdated()
-
getCacheTimestamp
public long getCacheTimestamp()
- Specified by:
getCacheTimestamp
in interfaceCachedObject
-
updateClient
public void updateClient()
Description copied from interface:ClientModel
Notifies other providers that this client has been updated.After a client is updated, providers can register for
ClientModel.ClientUpdatedEvent
. The setters in this model do not send an update for individual updates of the model. This method is here to allow for sending this event for this client, allowsing for to group multiple changes of a client and signal that all the changes in this client have been performed.- Specified by:
updateClient
in interfaceClientModel
- See Also:
ProviderEvent
,ProviderEventManager
,ClientModel.ClientUpdatedEvent
-
getId
public String getId()
Description copied from interface:ClientModel
Returns client internal ID (UUID).- Specified by:
getId
in interfaceClientModel
- Specified by:
getId
in interfaceClientScopeModel
- Specified by:
getId
in interfaceRoleContainerModel
-
getWebOrigins
public Set<String> getWebOrigins()
- Specified by:
getWebOrigins
in interfaceClientModel
-
setWebOrigins
public void setWebOrigins(Set<String> webOrigins)
- Specified by:
setWebOrigins
in interfaceClientModel
-
addClientScope
public void addClientScope(ClientScopeModel clientScope, boolean defaultScope)
Description copied from interface:ClientModel
Add clientScope with this client. Add it as default scope (if parameter 'defaultScope' is true) or optional scope (if parameter 'defaultScope' is false)- Specified by:
addClientScope
in interfaceClientModel
-
addClientScopes
public void addClientScopes(Set<ClientScopeModel> clientScopes, boolean defaultScope)
Description copied from interface:ClientModel
Add clientScopes with this client. Add as default scopes (if parameter 'defaultScope' is true) or optional scopes (if parameter 'defaultScope' is false)- Specified by:
addClientScopes
in interfaceClientModel
-
removeClientScope
public void removeClientScope(ClientScopeModel clientScope)
- Specified by:
removeClientScope
in interfaceClientModel
-
getClientScopes
public Map<String,ClientScopeModel> getClientScopes(boolean defaultScope)
Description copied from interface:ClientModel
Return all default scopes (if 'defaultScope' is true) or all optional scopes (if 'defaultScope' is false) linked with this client- Specified by:
getClientScopes
in interfaceClientModel
- Returns:
- map where key is the name of the clientScope, value is particular clientScope. Returns empty map if no scopes linked (never returns null).
-
addWebOrigin
public void addWebOrigin(String webOrigin)
- Specified by:
addWebOrigin
in interfaceClientModel
-
removeWebOrigin
public void removeWebOrigin(String webOrigin)
- Specified by:
removeWebOrigin
in interfaceClientModel
-
getRedirectUris
public Set<String> getRedirectUris()
- Specified by:
getRedirectUris
in interfaceClientModel
-
setRedirectUris
public void setRedirectUris(Set<String> redirectUris)
- Specified by:
setRedirectUris
in interfaceClientModel
-
addRedirectUri
public void addRedirectUri(String redirectUri)
- Specified by:
addRedirectUri
in interfaceClientModel
-
removeRedirectUri
public void removeRedirectUri(String redirectUri)
- Specified by:
removeRedirectUri
in interfaceClientModel
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interfaceClientModel
-
setEnabled
public void setEnabled(boolean enabled)
- Specified by:
setEnabled
in interfaceClientModel
-
isAlwaysDisplayInConsole
public boolean isAlwaysDisplayInConsole()
- Specified by:
isAlwaysDisplayInConsole
in interfaceClientModel
-
setAlwaysDisplayInConsole
public void setAlwaysDisplayInConsole(boolean alwaysDisplayInConsole)
- Specified by:
setAlwaysDisplayInConsole
in interfaceClientModel
-
getClientAuthenticatorType
public String getClientAuthenticatorType()
- Specified by:
getClientAuthenticatorType
in interfaceClientModel
-
setClientAuthenticatorType
public void setClientAuthenticatorType(String clientAuthenticatorType)
- Specified by:
setClientAuthenticatorType
in interfaceClientModel
-
validateSecret
public boolean validateSecret(String secret)
- Specified by:
validateSecret
in interfaceClientModel
-
getSecret
public String getSecret()
- Specified by:
getSecret
in interfaceClientModel
-
setSecret
public void setSecret(String secret)
- Specified by:
setSecret
in interfaceClientModel
-
getRegistrationToken
public String getRegistrationToken()
- Specified by:
getRegistrationToken
in interfaceClientModel
-
setRegistrationToken
public void setRegistrationToken(String registrationToken)
- Specified by:
setRegistrationToken
in interfaceClientModel
-
isPublicClient
public boolean isPublicClient()
- Specified by:
isPublicClient
in interfaceClientModel
-
setPublicClient
public void setPublicClient(boolean flag)
- Specified by:
setPublicClient
in interfaceClientModel
-
isFrontchannelLogout
public boolean isFrontchannelLogout()
- Specified by:
isFrontchannelLogout
in interfaceClientModel
-
setFrontchannelLogout
public void setFrontchannelLogout(boolean flag)
- Specified by:
setFrontchannelLogout
in interfaceClientModel
-
isFullScopeAllowed
public boolean isFullScopeAllowed()
- Specified by:
isFullScopeAllowed
in interfaceClientModel
-
setFullScopeAllowed
public void setFullScopeAllowed(boolean value)
- Specified by:
setFullScopeAllowed
in interfaceClientModel
-
getScopeMappingsStream
public Stream<RoleModel> getScopeMappingsStream()
Description copied from interface:ScopeContainerModel
Returns scope mappings for this scope container as a stream.- Specified by:
getScopeMappingsStream
in interfaceScopeContainerModel
- Returns:
- Stream of
RoleModel
. Never returnsnull
.
-
addScopeMapping
public void addScopeMapping(RoleModel role)
- Specified by:
addScopeMapping
in interfaceScopeContainerModel
-
deleteScopeMapping
public void deleteScopeMapping(RoleModel role)
- Specified by:
deleteScopeMapping
in interfaceScopeContainerModel
-
getRealmScopeMappingsStream
public Stream<RoleModel> getRealmScopeMappingsStream()
Description copied from interface:ScopeContainerModel
From the scope mappings returned byScopeContainerModel.getScopeMappingsStream()
returns only those that belong to the realm that owns this scope container.- Specified by:
getRealmScopeMappingsStream
in interfaceScopeContainerModel
- Returns:
- stream of
RoleModel
. Never returnsnull
.
-
getRealm
public RealmModel getRealm()
- Specified by:
getRealm
in interfaceClientModel
- Specified by:
getRealm
in interfaceClientScopeModel
-
getNotBefore
public int getNotBefore()
Description copied from interface:ClientModel
Time in seconds since epoc- Specified by:
getNotBefore
in interfaceClientModel
- Returns:
-
setNotBefore
public void setNotBefore(int notBefore)
- Specified by:
setNotBefore
in interfaceClientModel
-
getProtocol
public String getProtocol()
- Specified by:
getProtocol
in interfaceClientModel
- Specified by:
getProtocol
in interfaceClientScopeModel
-
setProtocol
public void setProtocol(String protocol)
- Specified by:
setProtocol
in interfaceClientModel
- Specified by:
setProtocol
in interfaceClientScopeModel
-
setAttribute
public void setAttribute(String name, String value)
- Specified by:
setAttribute
in interfaceClientModel
- Specified by:
setAttribute
in interfaceClientScopeModel
-
removeAttribute
public void removeAttribute(String name)
- Specified by:
removeAttribute
in interfaceClientModel
- Specified by:
removeAttribute
in interfaceClientScopeModel
-
getAttribute
public String getAttribute(String name)
- Specified by:
getAttribute
in interfaceClientModel
- Specified by:
getAttribute
in interfaceClientScopeModel
-
getAttributes
public Map<String,String> getAttributes()
- Specified by:
getAttributes
in interfaceClientModel
- Specified by:
getAttributes
in interfaceClientScopeModel
-
setAuthenticationFlowBindingOverride
public void setAuthenticationFlowBindingOverride(String name, String value)
- Specified by:
setAuthenticationFlowBindingOverride
in interfaceClientModel
-
removeAuthenticationFlowBindingOverride
public void removeAuthenticationFlowBindingOverride(String name)
- Specified by:
removeAuthenticationFlowBindingOverride
in interfaceClientModel
-
getAuthenticationFlowBindingOverride
public String getAuthenticationFlowBindingOverride(String name)
Description copied from interface:ClientModel
Get authentication flow binding override for this client. Allows client to override an authentication flow binding.- Specified by:
getAuthenticationFlowBindingOverride
in interfaceClientModel
- Parameters:
name
- examples are "browser", "direct_grant"- Returns:
-
getAuthenticationFlowBindingOverrides
public Map<String,String> getAuthenticationFlowBindingOverrides()
- Specified by:
getAuthenticationFlowBindingOverrides
in interfaceClientModel
-
getProtocolMappersStream
public Stream<ProtocolMapperModel> getProtocolMappersStream()
Description copied from interface:ProtocolMapperContainerModel
Returns protocol mappers as a stream.- Specified by:
getProtocolMappersStream
in interfaceProtocolMapperContainerModel
- Returns:
- Stream of protocol mapper. Never returns
null
.
-
addProtocolMapper
public ProtocolMapperModel addProtocolMapper(ProtocolMapperModel model)
- Specified by:
addProtocolMapper
in interfaceProtocolMapperContainerModel
-
removeProtocolMapper
public void removeProtocolMapper(ProtocolMapperModel mapping)
- Specified by:
removeProtocolMapper
in interfaceProtocolMapperContainerModel
-
updateProtocolMapper
public void updateProtocolMapper(ProtocolMapperModel mapping)
- Specified by:
updateProtocolMapper
in interfaceProtocolMapperContainerModel
-
getProtocolMapperById
public ProtocolMapperModel getProtocolMapperById(String id)
- Specified by:
getProtocolMapperById
in interfaceProtocolMapperContainerModel
-
getProtocolMapperByName
public ProtocolMapperModel getProtocolMapperByName(String protocol, String name)
- Specified by:
getProtocolMapperByName
in interfaceProtocolMapperContainerModel
-
getClientId
public String getClientId()
Description copied from interface:ClientModel
Returns client ID as defined by the user.- Specified by:
getClientId
in interfaceClientModel
- Returns:
-
setClientId
public void setClientId(String clientId)
- Specified by:
setClientId
in interfaceClientModel
-
getName
public String getName()
- Specified by:
getName
in interfaceClientModel
- Specified by:
getName
in interfaceClientScopeModel
-
setName
public void setName(String name)
- Specified by:
setName
in interfaceClientModel
- Specified by:
setName
in interfaceClientScopeModel
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceClientModel
- Specified by:
getDescription
in interfaceClientScopeModel
-
setDescription
public void setDescription(String description)
- Specified by:
setDescription
in interfaceClientModel
- Specified by:
setDescription
in interfaceClientScopeModel
-
isSurrogateAuthRequired
public boolean isSurrogateAuthRequired()
- Specified by:
isSurrogateAuthRequired
in interfaceClientModel
-
setSurrogateAuthRequired
public void setSurrogateAuthRequired(boolean surrogateAuthRequired)
- Specified by:
setSurrogateAuthRequired
in interfaceClientModel
-
getManagementUrl
public String getManagementUrl()
- Specified by:
getManagementUrl
in interfaceClientModel
-
setManagementUrl
public void setManagementUrl(String url)
- Specified by:
setManagementUrl
in interfaceClientModel
-
getRootUrl
public String getRootUrl()
- Specified by:
getRootUrl
in interfaceClientModel
-
setRootUrl
public void setRootUrl(String url)
- Specified by:
setRootUrl
in interfaceClientModel
-
getBaseUrl
public String getBaseUrl()
- Specified by:
getBaseUrl
in interfaceClientModel
-
setBaseUrl
public void setBaseUrl(String url)
- Specified by:
setBaseUrl
in interfaceClientModel
-
getDefaultRolesStream
@Deprecated public Stream<String> getDefaultRolesStream()
Deprecated.- Specified by:
getDefaultRolesStream
in interfaceRoleContainerModel
- Returns:
- Stream of default roles names or empty stream if there are none. Never returns
null
.
-
addDefaultRole
@Deprecated public void addDefaultRole(String name)
Deprecated.- Specified by:
addDefaultRole
in interfaceRoleContainerModel
-
removeDefaultRoles
@Deprecated public void removeDefaultRoles(String... defaultRoles)
Deprecated.- Specified by:
removeDefaultRoles
in interfaceRoleContainerModel
-
isBearerOnly
public boolean isBearerOnly()
- Specified by:
isBearerOnly
in interfaceClientModel
-
setBearerOnly
public void setBearerOnly(boolean only)
- Specified by:
setBearerOnly
in interfaceClientModel
-
isConsentRequired
public boolean isConsentRequired()
- Specified by:
isConsentRequired
in interfaceClientModel
-
setConsentRequired
public void setConsentRequired(boolean consentRequired)
- Specified by:
setConsentRequired
in interfaceClientModel
-
isStandardFlowEnabled
public boolean isStandardFlowEnabled()
- Specified by:
isStandardFlowEnabled
in interfaceClientModel
-
setStandardFlowEnabled
public void setStandardFlowEnabled(boolean standardFlowEnabled)
- Specified by:
setStandardFlowEnabled
in interfaceClientModel
-
isImplicitFlowEnabled
public boolean isImplicitFlowEnabled()
- Specified by:
isImplicitFlowEnabled
in interfaceClientModel
-
setImplicitFlowEnabled
public void setImplicitFlowEnabled(boolean implicitFlowEnabled)
- Specified by:
setImplicitFlowEnabled
in interfaceClientModel
-
isDirectAccessGrantsEnabled
public boolean isDirectAccessGrantsEnabled()
- Specified by:
isDirectAccessGrantsEnabled
in interfaceClientModel
-
setDirectAccessGrantsEnabled
public void setDirectAccessGrantsEnabled(boolean directAccessGrantsEnabled)
- Specified by:
setDirectAccessGrantsEnabled
in interfaceClientModel
-
isServiceAccountsEnabled
public boolean isServiceAccountsEnabled()
- Specified by:
isServiceAccountsEnabled
in interfaceClientModel
-
setServiceAccountsEnabled
public void setServiceAccountsEnabled(boolean serviceAccountsEnabled)
- Specified by:
setServiceAccountsEnabled
in interfaceClientModel
-
getRole
public RoleModel getRole(String name)
- Specified by:
getRole
in interfaceRoleContainerModel
-
addRole
public RoleModel addRole(String name)
- Specified by:
addRole
in interfaceRoleContainerModel
-
addRole
public RoleModel addRole(String id, String name)
- Specified by:
addRole
in interfaceRoleContainerModel
-
removeRole
public boolean removeRole(RoleModel role)
- Specified by:
removeRole
in interfaceRoleContainerModel
-
getRolesStream
public Stream<RoleModel> getRolesStream()
Description copied from interface:RoleContainerModel
Returns available roles as a stream.- Specified by:
getRolesStream
in interfaceRoleContainerModel
- Returns:
- Stream of
RoleModel
. Never returnsnull
.
-
getRolesStream
public Stream<RoleModel> getRolesStream(Integer first, Integer max)
Description copied from interface:RoleContainerModel
Returns available roles as a stream.- Specified by:
getRolesStream
in interfaceRoleContainerModel
- Parameters:
first
-Integer
Index of the first desired role. Ignored if negative ornull
.max
-Integer
Maximum number of returned roles. Ignored if negative ornull
.- Returns:
- Stream of
RoleModel
. Never returnsnull
.
-
searchForRolesStream
public Stream<RoleModel> searchForRolesStream(String search, Integer first, Integer max)
Description copied from interface:RoleContainerModel
Searches roles by the given name. Returns all roles that match the given filter.- Specified by:
searchForRolesStream
in interfaceRoleContainerModel
- Parameters:
search
-String
Name of the role to be used as a filter.first
-Integer
Index of the first desired role. Ignored if negative ornull
.max
-Integer
Maximum number of returned roles. Ignored if negative ornull
.- Returns:
- Stream of
RoleModel
. Never returnsnull
.
-
getNodeReRegistrationTimeout
public int getNodeReRegistrationTimeout()
- Specified by:
getNodeReRegistrationTimeout
in interfaceClientModel
-
setNodeReRegistrationTimeout
public void setNodeReRegistrationTimeout(int timeout)
- Specified by:
setNodeReRegistrationTimeout
in interfaceClientModel
-
getRegisteredNodes
public Map<String,Integer> getRegisteredNodes()
- Specified by:
getRegisteredNodes
in interfaceClientModel
-
registerNode
public void registerNode(String nodeHost, int registrationTime)
Description copied from interface:ClientModel
Register node or just update the 'lastReRegistration' time if this node is already registered- Specified by:
registerNode
in interfaceClientModel
-
unregisterNode
public void unregisterNode(String nodeHost)
- Specified by:
unregisterNode
in interfaceClientModel
-
hasDirectScope
public boolean hasDirectScope(RoleModel role)
Description copied from interface:ScopeContainerModel
Returnstrue
, if this object has the given role directly in its scope.- Specified by:
hasDirectScope
in interfaceClientModel
- Specified by:
hasDirectScope
in interfaceScopeContainerModel
- Parameters:
role
- the role- Returns:
- see description
- See Also:
if you want to check whether this object has the given role directly or indirectly in its scope
-
hasScope
public boolean hasScope(RoleModel role)
Description copied from interface:ScopeContainerModel
Returnstrue
, if this object has the given role directly or indirectly in its scope,false
otherwise.- Specified by:
hasScope
in interfaceScopeContainerModel
- Parameters:
role
- the role- Returns:
- see description
- See Also:
if you want to check if this object has the given role directly in its scope
-
-