@Singleton public class SessionServerConfig extends Object
Constructor and Description |
---|
SessionServerConfig(Debug sessionDebug,
SessionServiceURLService sessionServiceURLService)
Constructor called by Guice to initialize the Singleton instance of SessionServerConfig.
|
Modifier and Type | Method and Description |
---|---|
URL |
createLocalServerURL(String path)
Creates a new URL by adding the provided path to the end of this OpenAM server's URL.
|
URL |
createServerURL(URL server,
String path)
Creates a new URL by adding the provided path to the end of the provided server's URL.
|
Collection<String> |
getAllServerIDs()
Returns all server IDs.
|
String |
getLBCookieValue()
Returns the lbCookieValue corresponding to the server ID.
|
String |
getLocalServerID()
Gets ID for this OpenAM server from cache.
|
String |
getLocalServerID(boolean forceReload)
Gets ID for this OpenAM server from cache or refreshed depends on the parameter
|
URL |
getLocalServerSessionServiceURL()
Gets the full URL for this OpenAM server's session service servlet.
|
URL |
getLocalServerURL()
Gets the full URL for this OpenAM server.
|
String |
getPrimaryServerID()
Gets the ID of the primary server.
|
URL |
getPrimaryServerURL()
Gets the URL of the primary server.
|
Set<String> |
getSecondarySiteIDs() |
String |
getServerFromID(String serverID)
Returns the server URL based on the server ID.
|
Set<String> |
getServerIDsInLocalSite()
Returns IDs for all servers in the current site.
|
String |
getSiteID()
Returns the site ID for this Server.
|
URL |
getSiteURL() |
boolean |
isLocalNotificationService(URL url)
Returns true if the url is the URL of the local notification service.
|
boolean |
isLocalServer(String serverID)
Checks if server instance identified by serverID is this OpenAM server.
|
boolean |
isLocalSessionService(URL url)
Returns true if the URL is the URL of the local session service.
|
boolean |
isLocalSite(SessionID sid)
Checks if server instance identified by serverID is the same as local
instance
|
boolean |
isLocalSite(String siteID)
This method is called by Session.getLocalServerSessionServiceURL, when routing a request to an individual session host.
|
boolean |
isPrimaryServer(String serverID)
Checks if server instance identified by serverID is the primary server for this OpenAM server's site.
|
boolean |
isSite(String serverOrSiteId)
Checks whether the provided ID belongs to a site or not.
|
boolean |
isSiteEnabled()
Indicates if this server is part of a Site (or multiple sites).
|
@Inject public SessionServerConfig(@Named(value="amSession") Debug sessionDebug, SessionServiceURLService sessionServiceURLService)
WebtopNaming
being ready.public String getPrimaryServerID()
public URL getPrimaryServerURL()
public String getLocalServerID()
public String getLocalServerID(boolean forceReload)
forceReload
- - if true reloads the localServerID and does not use the cashed value.public URL getLocalServerURL()
public URL getLocalServerSessionServiceURL()
public boolean isSiteEnabled()
public String getSiteID()
public URL getSiteURL()
public Set<String> getSecondarySiteIDs()
public boolean isLocalServer(String serverID)
serverID
- server id, possibly null.public boolean isPrimaryServer(String serverID)
public boolean isLocalSite(String siteID)
siteID
- the server id (PRIMARY_ID) pulled from a presented cookie.true
if the provided ID corresponds to a local server or site.public boolean isSite(String serverOrSiteId)
serverOrSiteId
- The ID that needs to be checked.true
if the ID corresponds to a site.public boolean isLocalSite(SessionID sid)
sid
- server idpublic URL createLocalServerURL(String path) throws MalformedURLException
MalformedURLException
public URL createServerURL(URL server, String path) throws MalformedURLException
MalformedURLException
public Set<String> getServerIDsInLocalSite() throws Exception
Exception
public Collection<String> getAllServerIDs() throws Exception
Exception
public String getServerFromID(String serverID) throws ServerEntryNotFoundException
ServerEntryNotFoundException
public boolean isLocalSessionService(URL url)
url
- the url to checkpublic boolean isLocalNotificationService(URL url)
url
- the url to checkpublic String getLBCookieValue()
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.