ePages 6.11.0 - DE_EPAGES/WebInterface/API/Object/MonitorShared.pm

Package DE_EPAGES::WebInterface::API::Object::MonitorShared

Functions

blockTimeOut
isBlocked
isStarted
new
readResponse
redirect
reset
timeout
write
writeResponse

blockTimeOut

if the main thread dont want that the monitor start, it calls this function. monitor sets internal state blocked if not started yet.

Syntax
$Monitor->blockTimeOut;

isBlocked

Returns true if monitor is blocked. In this case the monitor will ignore the timeout and proceed with the normal processing.

Syntax
$IsBlocked = $Monitor->isBlocked;
Example
if( $Monitor->isBlocked ) { ... };
Return
$IsBlocked (boolean)
is monitor blocked

isStarted

Returns true if the monitor is started.

Syntax
$IsStarted = $Monitor->isStarted;
Example
if( $Monitor->isStarted ) { ... };
Return
$IsStarted (boolean)
is monitor started

new

Create a new monitor object, which covers the content pages and is triggered at timeout and response.

Syntax
$Servlet = new DE_EPAGES::WebInterface::API::Object::MonitorShared;
Return
$Servlet (object)
blessed object

readResponse

Updates the given Response object with Response which was saved via _WriteResponse.

Syntax
$Monitor->readResponse($Response, $GUID);
Input
$Response (object)
HTTP::Response object
$GUID (string)
unique monitor identifier

redirect

sends a redirect response to webadapter.

Syntax
$Monitor->redirect;

reset

generates an resets the monitor, generates a GUID. This function should be called at each DE_EPAGES::Core::API::Object::MonitorThread::run of the monitor thread.

Syntax
$Monitor->reset;

timeout

The Monitor thread gets a timeout, this function writes the ContentMonitor attribute to filesystem and redirect the Browser to this file.

Syntax
$Monitor->timeout;

write

writes the monitor file to filesystem. With the $ContentName it's possible to use different attributes for save.

Syntax
$Monitor->write($ContentName);
Input
$ContentName (string)
attribute name of content

writeResponse

If the main thread is ready and the Monitor thread got a timeout, this function writes the response to the filesystem and write the ContentResponse to the monitor file. this content includes an forward to the Monitor servlet, which sends the Response to the browser.

Syntax
$Monitor->writeResponse($Response);
Input
$Response (HTTP::Response)
response of main thread