org.exoplatform.services.portletcontainer.plugins.pc.monitor
Class PortletContainerMonitorImpl

java.lang.Object
  extended by org.exoplatform.services.portletcontainer.plugins.pc.monitor.PortletContainerMonitorImpl
All Implemented Interfaces:
PortletContainerMonitor

public class PortletContainerMonitorImpl
extends Object
implements PortletContainerMonitor

Created by The eXo Platform SAS. Author : Mestrallet Benjamin benjmestrallet@users.sourceforge.net Date: Sep 10, 2003 Time: 2:36:19 PM


Field Summary
static char SEPARATOR
          Separator.
static Map<String,Long> versionNumberMap
          Version numbers.
 
Constructor Summary
PortletContainerMonitorImpl(org.exoplatform.services.cache.CacheService cacheService)
           
 
Method Summary
 void brokePortlet(String portletAppName, String portletName)
           
 void destroy(String portletApplicationName, String portletName)
           
 byte[] getCachedContent(String portletAppName, String portletName, String key, boolean isCacheGlobal)
          Overridden method.
 String getCachedETag(String portletAppName, String portletName, String key, boolean isCacheGlobal)
          Overridden method.
 String getCachedTitle(String portletAppName, String portletName, String key, boolean isCacheGlobal)
          Overridden method.
 int getCacheExpirationPeriod(String portletApplicationName, String portletName)
          Overridden method.
 String getCacheScope(String portletApplicationName, String portletName)
           
 long getInitializationTime(String portletAppName, String portletName)
          Overridden method.
 long getPortletLastAccessTime(String portletAppName, String portletName, String key, boolean isCacheGlobal)
          Overridden method.
 long getPortletLastCacheUpdateTime(String portletAppName, String portletName, String key, boolean isCacheGlobal)
          Overridden method.
 PortletRuntimeDatasImpl getPortletRuntimeData(String appName, String portletName)
           
 Map<String,PortletRuntimeData> getPortletRuntimeDataMap()
          Overridden method.
 long getPortletVersionNumber(String portletAppName)
          Overridden method.
 void init(String portletAppName, String portletName, int cacheExpirationTime)
           
 boolean isAvailable(String portletApplicationName, String portletName)
          Overridden method.
 boolean isAvailable(String portletApplicationName, String portletName, long l)
          Overridden method.
 boolean isBroken(String portletAppName, String portletName)
          Overridden method.
 boolean isDataCached(String portletApplicationName, String portletName, String key, boolean isCacheGlobal)
          Overridden method.
 boolean isDestroyed(String portletAppName, String portletName)
          Overridden method.
 boolean isInitialisationAllowed(String portletApplicationName, String portletName, long l)
          Overridden method.
 boolean isInitialized(String portletAppName, String portletName)
          Overridden method.
 boolean needsCacheInvalidation(String portletAppName, String portletName, String key, javax.portlet.PortletMode mode, javax.portlet.WindowState window, boolean isCacheGlobal)
           
 void register(String portletApplicationName, String portletName)
           
 void registerPortletApp(String portletApplicationName)
           
 void removeCachedData(String portletApplicationName, String portletName, String key, boolean isCacheGlobal)
           
 void setCachedContent(String portletAppName, String portletName, String key, byte[] content, boolean isCacheGlobal)
           
 void setCachedETag(String portletAppName, String portletName, String key, String etag, boolean isCacheGlobal)
           
 void setCachedMode(String portletAppName, String portletName, String key, javax.portlet.PortletMode mode, boolean isCacheGlobal)
           
 void setCachedTitle(String portletAppName, String portletName, String key, String title, boolean isCacheGlobal)
           
 void setCachedWindowState(String portletAppName, String portletName, String key, javax.portlet.WindowState window, boolean isCacheGlobal)
           
 void setCacheExpirationPeriod(String portletAppName, String portletName, int i)
           
 void setCacheScope(String portletAppName, String portletName, String s)
           
 void setInitializationTime(String portletAppName, String portletName, long accessTime)
          Overridden method.
 void setLastAccessTime(String portletAppName, String portletName, long l)
           
 void setLastFailureAccessTime(String portletAppName, String portletName, long l)
           
 void setLastInitFailureAccessTime(String portletAppName, String portletName, long l)
           
 void setPortletLastAccessTime(String portletAppName, String portletName, String key, long lastAccessTime, boolean isCacheGlobal)
           
 void setUnavailabilityPeriod(String portletAppName, String portletName, int unavailableSeconds)
           
 long whenAvailable(String portletApplicationName, String portletName)
          Overridden method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEPARATOR

public static final char SEPARATOR
Separator.

See Also:
Constant Field Values

versionNumberMap

public static Map<String,Long> versionNumberMap
Version numbers.

Constructor Detail

PortletContainerMonitorImpl

public PortletContainerMonitorImpl(org.exoplatform.services.cache.CacheService cacheService)
                            throws Exception
Parameters:
cacheService - cache service
Throws:
Exception - exception
Method Detail

getPortletRuntimeDataMap

public final Map<String,PortletRuntimeData> getPortletRuntimeDataMap()
Overridden method.

Specified by:
getPortletRuntimeDataMap in interface PortletContainerMonitor
Returns:
runtime datas
See Also:
PortletContainerMonitor.getPortletRuntimeDataMap()

getPortletRuntimeData

public final PortletRuntimeDatasImpl getPortletRuntimeData(String appName,
                                                           String portletName)
Parameters:
appName - portlet application name
portletName - portlet name
Returns:
runtime datas

registerPortletApp

public final void registerPortletApp(String portletApplicationName)
Parameters:
portletApplicationName - portlet application name

getPortletVersionNumber

public final long getPortletVersionNumber(String portletAppName)
Overridden method.

Specified by:
getPortletVersionNumber in interface PortletContainerMonitor
Parameters:
portletAppName - portlet app name
Returns:
portlet version number
See Also:
PortletContainerMonitor.getPortletVersionNumber(java.lang.String)

register

public final void register(String portletApplicationName,
                           String portletName)
Parameters:
portletApplicationName - portlet app name
portletName - portlet name

isInitialized

public final boolean isInitialized(String portletAppName,
                                   String portletName)
Overridden method.

Specified by:
isInitialized in interface PortletContainerMonitor
Parameters:
portletAppName - portlet app name
portletName - portlet name
Returns:
is initialized
See Also:
PortletContainerMonitor.isInitialized(java.lang.String, java.lang.String)

init

public final void init(String portletAppName,
                       String portletName,
                       int cacheExpirationTime)
Parameters:
portletAppName - portlet app name
portletName - portlet name
cacheExpirationTime - cache expiration time

brokePortlet

public final void brokePortlet(String portletAppName,
                               String portletName)
Parameters:
portletAppName - portlet app name
portletName - portlet name

isBroken

public final boolean isBroken(String portletAppName,
                              String portletName)
Overridden method.

Specified by:
isBroken in interface PortletContainerMonitor
Parameters:
portletAppName - portlet app name
portletName - portlet name
Returns:
is broken
See Also:
PortletContainerMonitor.isBroken(java.lang.String, java.lang.String)

isDestroyed

public final boolean isDestroyed(String portletAppName,
                                 String portletName)
Overridden method.

Specified by:
isDestroyed in interface PortletContainerMonitor
Parameters:
portletAppName - portlet app name
portletName - portlet name
Returns:
is destroyed
See Also:
PortletContainerMonitor.isDestroyed(java.lang.String, java.lang.String)

isAvailable

public final boolean isAvailable(String portletApplicationName,
                                 String portletName,
                                 long l)
Overridden method.

Specified by:
isAvailable in interface PortletContainerMonitor
Parameters:
portletApplicationName - portlet app name
portletName - portlet name
l - time
Returns:
is available
See Also:
PortletContainerMonitor.isAvailable(java.lang.String, java.lang.String, long)

isAvailable

public final boolean isAvailable(String portletApplicationName,
                                 String portletName)
Overridden method.

Specified by:
isAvailable in interface PortletContainerMonitor
Parameters:
portletApplicationName - portlet app name
portletName - portlet name
Returns:
is available
See Also:
PortletContainerMonitor.isAvailable(java.lang.String, java.lang.String)

whenAvailable

public final long whenAvailable(String portletApplicationName,
                                String portletName)
Overridden method.

Specified by:
whenAvailable in interface PortletContainerMonitor
Parameters:
portletApplicationName - portlet app name
portletName - portlet name
Returns:
when available
See Also:
PortletContainerMonitor.whenAvailable(java.lang.String, java.lang.String)

isInitialisationAllowed

public final boolean isInitialisationAllowed(String portletApplicationName,
                                             String portletName,
                                             long l)
Overridden method.

Specified by:
isInitialisationAllowed in interface PortletContainerMonitor
Parameters:
portletApplicationName - portlet app name
portletName - portlet name
l - time
Returns:
is initialization allowed
See Also:
PortletContainerMonitor.isInitialisationAllowed(java.lang.String, java.lang.String, long)

destroy

public final void destroy(String portletApplicationName,
                          String portletName)
Parameters:
portletApplicationName - portlet app name
portletName - portlet name

setLastAccessTime

public final void setLastAccessTime(String portletAppName,
                                    String portletName,
                                    long l)
Parameters:
portletAppName - portlet app name
portletName - portlet name
l - last access time

setLastInitFailureAccessTime

public final void setLastInitFailureAccessTime(String portletAppName,
                                               String portletName,
                                               long l)
Parameters:
portletAppName - portlet app name
portletName - portlet name
l - last init failure access time

setLastFailureAccessTime

public final void setLastFailureAccessTime(String portletAppName,
                                           String portletName,
                                           long l)
Parameters:
portletAppName - portlet app name
portletName - portlet name
l - last failure access time

setUnavailabilityPeriod

public final void setUnavailabilityPeriod(String portletAppName,
                                          String portletName,
                                          int unavailableSeconds)
Parameters:
portletAppName - portlet app name
portletName - portlet name
unavailableSeconds - unavailability time in seconds

isDataCached

public final boolean isDataCached(String portletApplicationName,
                                  String portletName,
                                  String key,
                                  boolean isCacheGlobal)
Overridden method.

Specified by:
isDataCached in interface PortletContainerMonitor
Parameters:
portletApplicationName - portlet app name
portletName - portlet name
key - key
isCacheGlobal - is cache global
Returns:
is data cached
See Also:
PortletContainerMonitor.isDataCached(java.lang.String, java.lang.String, java.lang.String, boolean)

removeCachedData

public final void removeCachedData(String portletApplicationName,
                                   String portletName,
                                   String key,
                                   boolean isCacheGlobal)
Parameters:
portletApplicationName - portlet app name
portletName - portlet name
key - key
isCacheGlobal - is cache global

getCacheExpirationPeriod

public final int getCacheExpirationPeriod(String portletApplicationName,
                                          String portletName)
Overridden method.

Specified by:
getCacheExpirationPeriod in interface PortletContainerMonitor
Parameters:
portletApplicationName - portlet app name
portletName - portlet name
Returns:
cache expiration period
See Also:
PortletContainerMonitor.getCacheExpirationPeriod(java.lang.String, java.lang.String)

setCacheExpirationPeriod

public final void setCacheExpirationPeriod(String portletAppName,
                                           String portletName,
                                           int i)
Parameters:
portletAppName - portlet app name
portletName - portlet name
i - cache expiration period

getPortletLastAccessTime

public final long getPortletLastAccessTime(String portletAppName,
                                           String portletName,
                                           String key,
                                           boolean isCacheGlobal)
Overridden method.

Specified by:
getPortletLastAccessTime in interface PortletContainerMonitor
Parameters:
portletAppName - portlet app name
portletName - portlet name
key - key
isCacheGlobal - is cache global
Returns:
last access time
See Also:
PortletContainerMonitor.getPortletLastAccessTime(java.lang.String, java.lang.String, java.lang.String, boolean)

getPortletLastCacheUpdateTime

public final long getPortletLastCacheUpdateTime(String portletAppName,
                                                String portletName,
                                                String key,
                                                boolean isCacheGlobal)
Overridden method.

Specified by:
getPortletLastCacheUpdateTime in interface PortletContainerMonitor
Parameters:
portletAppName - portlet app name
portletName - portlet name
key - key
isCacheGlobal - is cache global
Returns:
last cache update time
See Also:
PortletContainerMonitor.getPortletLastCacheUpdateTime(java.lang.String, java.lang.String, java.lang.String, boolean)

setPortletLastAccessTime

public final void setPortletLastAccessTime(String portletAppName,
                                           String portletName,
                                           String key,
                                           long lastAccessTime,
                                           boolean isCacheGlobal)
Parameters:
portletAppName - portlet app name
portletName - portlet name
key - key
lastAccessTime - last access time
isCacheGlobal - is cache global

setCachedTitle

public final void setCachedTitle(String portletAppName,
                                 String portletName,
                                 String key,
                                 String title,
                                 boolean isCacheGlobal)
Parameters:
portletAppName - portlet app name
portletName - portlet name
key - key
title - title
isCacheGlobal - is cache global

getCachedTitle

public final String getCachedTitle(String portletAppName,
                                   String portletName,
                                   String key,
                                   boolean isCacheGlobal)
Overridden method.

Specified by:
getCachedTitle in interface PortletContainerMonitor
Parameters:
portletAppName - portlet app name
portletName - portlet name
key - key
isCacheGlobal - is cache global
Returns:
cached title
See Also:
PortletContainerMonitor.getCachedTitle(java.lang.String, java.lang.String, java.lang.String, boolean)

setCachedETag

public final void setCachedETag(String portletAppName,
                                String portletName,
                                String key,
                                String etag,
                                boolean isCacheGlobal)
Parameters:
portletAppName - portlet app name
portletName - portlet name
key - key
etag - ETag
isCacheGlobal - is cache global

getCachedETag

public final String getCachedETag(String portletAppName,
                                  String portletName,
                                  String key,
                                  boolean isCacheGlobal)
Overridden method.

Specified by:
getCachedETag in interface PortletContainerMonitor
Parameters:
portletAppName - portlet app name
portletName - portlet name
key - key
isCacheGlobal - is cache global
Returns:
ETag
See Also:
PortletContainerMonitor.getCachedETag(java.lang.String, java.lang.String, java.lang.String, boolean)

setCachedContent

public final void setCachedContent(String portletAppName,
                                   String portletName,
                                   String key,
                                   byte[] content,
                                   boolean isCacheGlobal)
Parameters:
portletAppName - portlet app name
portletName - portlet name
key - key
content - content
isCacheGlobal - is cache global
isCacheGlobal -

getCachedContent

public final byte[] getCachedContent(String portletAppName,
                                     String portletName,
                                     String key,
                                     boolean isCacheGlobal)
Overridden method.

Specified by:
getCachedContent in interface PortletContainerMonitor
Parameters:
portletAppName - portlet app name
portletName - portlet name
key - key
isCacheGlobal - is cache global
Returns:
cached content
See Also:
PortletContainerMonitor.getCachedContent(java.lang.String, java.lang.String, java.lang.String, boolean)

setCachedMode

public final void setCachedMode(String portletAppName,
                                String portletName,
                                String key,
                                javax.portlet.PortletMode mode,
                                boolean isCacheGlobal)
Parameters:
portletAppName - portlet app name
portletName - portlet name
key - key
mode - mode
isCacheGlobal - is cache global

setCachedWindowState

public final void setCachedWindowState(String portletAppName,
                                       String portletName,
                                       String key,
                                       javax.portlet.WindowState window,
                                       boolean isCacheGlobal)
Parameters:
portletAppName - portlet app name
portletName - portlet name
key - key
window - window
isCacheGlobal - is cache global

needsCacheInvalidation

public final boolean needsCacheInvalidation(String portletAppName,
                                            String portletName,
                                            String key,
                                            javax.portlet.PortletMode mode,
                                            javax.portlet.WindowState window,
                                            boolean isCacheGlobal)
Parameters:
portletAppName - portlet app name
portletName - portlet name
key - key
mode - mode
window - window
isCacheGlobal - is cache global
Returns:
needs cache invalidation

setInitializationTime

public final void setInitializationTime(String portletAppName,
                                        String portletName,
                                        long accessTime)
Overridden method.

Specified by:
setInitializationTime in interface PortletContainerMonitor
Parameters:
portletAppName - portlet app name
portletName - portlet name
accessTime - access time
See Also:
PortletContainerMonitor.setInitializationTime(java.lang.String, java.lang.String, long)

getInitializationTime

public final long getInitializationTime(String portletAppName,
                                        String portletName)
Overridden method.

Specified by:
getInitializationTime in interface PortletContainerMonitor
Parameters:
portletAppName - portlet app name
portletName - portlet name
Returns:
initialization time
See Also:
PortletContainerMonitor.getInitializationTime(java.lang.String, java.lang.String)

getCacheScope

public final String getCacheScope(String portletApplicationName,
                                  String portletName)
Parameters:
portletApplicationName - portlet application name
portletName - portlet name
Returns:
scope

setCacheScope

public final void setCacheScope(String portletAppName,
                                String portletName,
                                String s)
Parameters:
portletAppName - portlet app name
portletName - portlet name
s - scope


Copyright © 2009 eXo Platform SAS. All Rights Reserved.