The Refresh Cycle and the Channel Agent

The refresh cycle is a generic phrase used to describe what happens when the Refresh method is invoked on an IChannel or IProject dispinterface.  When this occurs, it is said that the refresh cycle for the channel or project has begun.

During this cycle, a Channel object runs a script called a Channel Agent.  It does this using an Active Scripting Host.  This process is similar to the one used with the Windows Scripting Host (WSH) and the Active Server Pages (ASP) system of Internet Information Server 3.0 and above.  In the case of the channel scripting host, four dispinterfaces are passed to the namespace for the executing script (agent).  They are listed below along with a brief description.

Intrinsic Namespace Interfaces

channel

this name specifies an IChannel dispinterface on the Channel object running the refresh cycle.

project

this name specifies an IProject dispinterface.  This interface is passed to the Refresh method directly or indirectly.  See the Project Class.

options

this name specifies a dispinterface to the class Dictionary object referred to by the name RefreshOptions on the Channel object.  This collection is used to pass refresh option information to the agent for the refresh cycle.

util

this name specifies a dispinterface to methods that perform routine tasks useful within an agent.

Any agent script can access these interfaces by name as if they were intrinsic, just as an ASP page script can access the Request interface within an ASP page.

Scheduling Refresh Cycles for Automatic Execution

An instance of the Task class can be used to schedule a routine refresh cycle on a given project using the Microsoft Scheduled Tasks Administrative tool that comes with Site Server 3.0 and later versions of Microsoft Windows NT.

Project Vs Channel Refresh

Each Channel object can have its own agent and refresh options configured.  Normally, one would configure the main channels of a project with various refresh channel agents and then schedule a task with the Scheduled Tasks Administrative tool.  This would call Refresh on the Project object's IProject dispinterface.  When this occurs, the RefreshAll method is invoked on the top-level channel's IChannel dispinterface.  This recursively invokes the RefreshAll method on all Channel object in the content hierarchy for the project.  Hence, the entire project and all of its subordinate Channel objects have the refresh cycle run.


© 1997-1998 Microsoft Corporation. All rights reserved.