public class CrawlerSessionManagerValve extends ValveBase implements Lifecycle, javax.servlet.http.HttpSessionBindingListener
| Modifier and Type | Field and Description |
|---|---|
protected LifecycleSupport |
lifecycle
The lifecycle event support for this component.
|
protected boolean |
started |
container, controller, domain, info, mserver, next, onameAFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, DESTROY_EVENT, INIT_EVENT, PERIODIC_EVENT, START_EVENT, STOP_EVENT| Constructor and Description |
|---|
CrawlerSessionManagerValve() |
| Modifier and Type | Method and Description |
|---|---|
void |
addLifecycleListener(LifecycleListener listener)
Add a LifecycleEvent listener to this component.
|
LifecycleListener[] |
findLifecycleListeners()
Get the lifecycle listeners associated with this lifecycle.
|
Map<String,String> |
getClientIpSessionId() |
String |
getCrawlerUserAgents() |
int |
getSessionInactiveInterval() |
void |
invoke(Request request,
Response response)
The implementation-specific logic represented by this Valve.
|
void |
removeLifecycleListener(LifecycleListener listener)
Remove a LifecycleEvent listener from this component.
|
void |
setCrawlerUserAgents(String crawlerUserAgents)
Specify the regular expression (using
Pattern) that will be used
to identify crawlers based in the User-Agent header provided. |
void |
setSessionInactiveInterval(int sessionInactiveInterval)
Specify the session timeout (in seconds) for a crawler's session.
|
void |
start()
Prepare for the beginning of active use of the public methods of this
component.
|
void |
stop()
Gracefully terminate the active use of the public methods of this
component.
|
void |
valueBound(javax.servlet.http.HttpSessionBindingEvent event) |
void |
valueUnbound(javax.servlet.http.HttpSessionBindingEvent event) |
backgroundProcess, createObjectName, event, getContainer, getContainerName, getController, getDomain, getInfo, getNext, getObjectName, getParentName, postDeregister, postRegister, preDeregister, preRegister, setContainer, setController, setNext, setObjectName, toStringprotected LifecycleSupport lifecycle
protected boolean started
public void setCrawlerUserAgents(String crawlerUserAgents)
Pattern) that will be used
to identify crawlers based in the User-Agent header provided. The default
is ".*GoogleBot.*|.*bingbot.*|.*Yahoo! Slurp.*"crawlerUserAgents - The regular expression using Patternpublic String getCrawlerUserAgents()
setCrawlerUserAgents(String)public void setSessionInactiveInterval(int sessionInactiveInterval)
sessionInactiveInterval - The new timeout for crawler sessionspublic int getSessionInactiveInterval()
setSessionInactiveInterval(int)public void addLifecycleListener(LifecycleListener listener)
LifecycleaddLifecycleListener in interface Lifecyclelistener - The listener to addpublic LifecycleListener[] findLifecycleListeners()
LifecyclefindLifecycleListeners in interface Lifecyclepublic void removeLifecycleListener(LifecycleListener listener)
LifecycleremoveLifecycleListener in interface Lifecyclelistener - The listener to removepublic void start()
throws LifecycleException
Lifecyclestart in interface LifecycleLifecycleException - if this component detects a fatal error
that prevents this component from being usedpublic void stop()
throws LifecycleException
Lifecyclestop in interface LifecycleLifecycleException - if this component detects a fatal error
that needs to be reportedpublic void invoke(Request request, Response response) throws IOException, javax.servlet.ServletException
ValveBaseThis method MUST be provided by a subclass.
invoke in interface Valveinvoke in class ValveBaserequest - The servlet request to be processedresponse - The servlet response to be createdIOException - if an input/output error occursjavax.servlet.ServletException - if a servlet error occurspublic void valueBound(javax.servlet.http.HttpSessionBindingEvent event)
valueBound in interface javax.servlet.http.HttpSessionBindingListenerpublic void valueUnbound(javax.servlet.http.HttpSessionBindingEvent event)
valueUnbound in interface javax.servlet.http.HttpSessionBindingListenerCopyright © 2016 JBoss by Red Hat. All rights reserved.