org.dspace.app.xmlui.aspect.administrative
Class CurrentActivityAction

java.lang.Object
  extended by org.apache.cocoon.util.AbstractLogEnabled
      extended by org.apache.cocoon.acting.AbstractAction
          extended by org.dspace.app.xmlui.aspect.administrative.CurrentActivityAction
All Implemented Interfaces:
org.apache.cocoon.acting.Action

public class CurrentActivityAction
extends org.apache.cocoon.acting.AbstractAction

This action simply records pipeline events that it sees, keeping track of the users and pages they are viewing. Later the control panel's activity viewer can access this data to get a realtime snap shot of current activity of the repository.

Author:
Scott Phillips

Nested Class Summary
static class CurrentActivityAction.Event
          An object that represents an activity event.
 
Field Summary
static String IP_HEADER
          The HTTP header that contains the real IP for this request, this is used when DSpace is placed behind a load balancer
static int MAX_EVENTS
          The maximum number of events that are recorded
 
Fields inherited from class org.apache.cocoon.acting.AbstractAction
EMPTY_MAP
 
Fields inherited from interface org.apache.cocoon.acting.Action
ROLE
 
Constructor Summary
CurrentActivityAction()
           
 
Method Summary
 Map act(org.apache.cocoon.environment.Redirector redirector, org.apache.cocoon.environment.SourceResolver resolver, Map objectModel, String source, org.apache.avalon.framework.parameters.Parameters parameters)
          Record this current event.
static List<CurrentActivityAction.Event> getEvents()
           
static boolean getRecordAnonymousEvents()
           
static boolean getRecordBotEvents()
           
static void setRecordAnonymousEvents(boolean record)
           
static void setRecordBotEvents(boolean record)
           
 
Methods inherited from class org.apache.cocoon.util.AbstractLogEnabled
getLogger, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_EVENTS

public static final int MAX_EVENTS
The maximum number of events that are recorded


IP_HEADER

public static final String IP_HEADER
The HTTP header that contains the real IP for this request, this is used when DSpace is placed behind a load balancer

Constructor Detail

CurrentActivityAction

public CurrentActivityAction()
Method Detail

act

public Map act(org.apache.cocoon.environment.Redirector redirector,
               org.apache.cocoon.environment.SourceResolver resolver,
               Map objectModel,
               String source,
               org.apache.avalon.framework.parameters.Parameters parameters)
        throws Exception
Record this current event.

Throws:
Exception

getEvents

public static List<CurrentActivityAction.Event> getEvents()
Returns:
a list of all current events.

getRecordAnonymousEvents

public static boolean getRecordAnonymousEvents()

setRecordAnonymousEvents

public static void setRecordAnonymousEvents(boolean record)

getRecordBotEvents

public static boolean getRecordBotEvents()

setRecordBotEvents

public static void setRecordBotEvents(boolean record)


Copyright © 2013 DuraSpace. All Rights Reserved.