ServerName (Agent - Java)

Read-Write. The name of the server on which an agent runs.

Defined in

Agent

Data type

String

Syntax

public String getServerName()
    throws NotesException
public void setServerName(String serverName)
    throws NotesException

Usage

The value returned by getServerName depends upon whether the agent is scheduled:

  • If the agent is scheduled, the property returns the name of the server on which the scheduled agent runs. Since scheduled agents can only run on a single replica of a database, you designate a server name for the agent under Schedule in the Agent Properties box. Therefore, the ServerName property may represent the parent database's server, or it may represent a replica's server.
  • If the agent is not scheduled, this property returns an empty string.
  • You can set ServerName to the asterisk (*) to indicate that the agent can run on any server.
  • A null ServerName means the local workstation.

You must call Save to make any change effective.

Example