Agent (Java)

Represents an agent.

Syntax

public class Agent extends Base

Containment

Contained by: AgentContext and Database

Contains: Database and DateTime

Properties

Comment through getComment

CommonOwner through getCommonOwner

HttpURL through getHttpURL

IsActivatable through isActivatable

IsEnabled through isEnabled and setEnabled

IsNotesAgent through isNotesAgent

IsProhibitDesignUpdate

IsPublic through isPublic

IsWebAgent through isWebAgent

LastRun through getLastRun

LockHolders through getLockHolders

Name through getName

NotesURL through getNotesURL

OnBehalfOf through getOnBehalfOf

Owner through getOwner

ParameterDocID through getParameterDocID

Parent through getParent

Query through getQuery

ServerName through getServerName and setServerName

Target through getTarget

Trigger through getTrigger

Method

getURL

lock

lockProvisional

recycle

remove

run

runOnServer

save

toString

unlock

Access

There are two ways to access an agent:

  • To access the agent that's currently running, use getCurrentAgent in AgentContext.
  • To access all the agents in a database, use getAgents in Database.

Usage

System.out writes to an Events document ("Miscellaneous Events" view) in the log.nsf database where the code executes for:

Example