|
|
|
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.torweg.pulse.service.event.RedirectEvent
public class RedirectEvent
redirects to a given URL using a permantent redirect (
301 Moved Permanently) as the default.
Temporary redirects can be enabled by calling
setTemporaryRedirect(boolean).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.torweg.pulse.service.event.Event |
|---|
Event.Disposition |
| Constructor Summary | |
|---|---|
RedirectEvent(ServiceRequest req)
used by the search engine filter of the ServiceRequestImpl
to send redirects to search engines that request sessions. |
|
RedirectEvent(java.lang.String str)
builds a new RedirectEvent. |
|
RedirectEvent(java.net.URL dest)
builds a new RedirectEvent. |
|
| Method Summary | |
|---|---|
CacheMode |
getCacheMode()
returns the CacheMode. |
boolean |
isOutputEvent()
Indicates if this Event will write to the
OutputStream and so render the OutputStream
unwritable for future results. |
boolean |
isSingularEvent()
Indicates that the Event will only be added once to the
EventManager and block all other Events. |
boolean |
isStopEvent()
Indicates if the Invoker should proceed executing other
bundles or if it should terminate after executing this Event
. |
static void |
redirectPermanently(javax.servlet.http.HttpServletResponse response,
java.lang.String location)
sends a permanent redirect ( 301 Moved permanently) to the
given location. |
void |
run(ServiceRequest req)
will be called by the event processor. |
void |
setCacheMode(CacheMode c)
sets the CacheMode. |
void |
setTemporaryRedirect(boolean b)
sets whether the redirect is a temporary redirect. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RedirectEvent(java.net.URL dest)
RedirectEvent.
dest - destinationpublic RedirectEvent(java.lang.String str)
RedirectEvent.
str - the URL to redirect topublic RedirectEvent(ServiceRequest req)
ServiceRequestImpl
to send redirects to search engines that request sessions.
req - the service request| Method Detail |
|---|
public static final void redirectPermanently(javax.servlet.http.HttpServletResponse response,
java.lang.String location)
301 Moved permanently) to the
given location.
response - the response for sending the redirectlocation - the location for the redirect (must be an absolute URI per RFC
2616)public final void setTemporaryRedirect(boolean b)
b - true, if the redirect shall be temporarypublic final void run(ServiceRequest req)
Event
run in interface Eventreq - the current requestEvent.run(org.torweg.pulse.service.request.ServiceRequest)public final boolean isOutputEvent()
EventEvent will write to the
OutputStream and so render the OutputStream
unwritable for future results.
Please note: After writing to the OutputStream it should be
flushed and closed.
isOutputEvent in interface EventtrueEvent.isOutputEvent()public final boolean isStopEvent()
EventInvoker should proceed executing other
bundles or if it should terminate after executing this Event
.
isStopEvent in interface EventtrueEvent.isStopEvent()public final boolean isSingularEvent()
EventEvent will only be added once to the
EventManager and block all other Events.
If an Event of the same type has already been added to the
EventManager, subsequent calls to
EventManager.addEvent(Event) will return without adding the given
Event.
isSingularEvent in interface EventtrueEvent.isSingularEvent()public final CacheMode getCacheMode()
CacheMode.
getCacheMode in interface EventEvent.getCacheMode()public final void setCacheMode(CacheMode c)
CacheMode.
setCacheMode in interface Eventc - the cache mode to setEvent.setCacheMode(org.torweg.pulse.service.request.CacheMode)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||