Adobe 38000382 JRun Guide - Page 73

getServersOnHost, invoke, For an example that iterates over the results of

Page 73 highlights

getServersOnHost Description Returns a java.util.List of server names on the specified host. Attributes Attribute active id server host oneOnly Description Set to true to return only the names of servers that are currently running. The default is false. (Required.) The variable name of the returned List object. Returns a list of servers on the host on which the specified server is running. For example, if your localhost is running the admin, samples, and default server, and you specify server="default", JRun returns admin and samples in a List. You must specify either a server or a host attribute. Returns a list of all servers on the specified host. You must specify either a server or a host attribute. Set to true to return only the name of the first server in the list. The default is false. Example The following example prints a List of servers on the specified host in a raw format: ... ... For an example that iterates over the results of the getServersOnHost tag, see invoke on page 59. invoke Description Invokes the method on the specified object. You can set parameters using the parameter tag, which must specify a value and, optionally, type. The parameter's name attribute is ignored. Attributes Attribute id type host Description (Required.) The variable name of the returned object. Specifies the class on which the method is invoked. Required if the method returns an object. If only host is specified, then the JRunAdminService is accessed on the first running server detected on the host. If host is specified and service is specified, then the service is accessed on the first running server detected on the host. JMC custom tags reference 59

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116

JMC custom tags reference
59
getServersOnHost
Description
Returns a java.util.List of server names on the specified host.
Attributes
Example
The following example prints a List of servers on the specified host in a raw format:
...
<%@ page import="java.io.*, javax.naming.Context, java.util.*"%>
<% String host = "localhost"; %>
<jmcmgmt:getServersOnHost host="<%=host%>" id="servers"/>
<B><%= servers %></B>
...
For an example that iterates over the results of the
getServersOnHost
tag, see
invoke on
page 59
.
invoke
Description
Invokes the method on the specified object. You can set parameters using the parameter
tag, which must specify a value and, optionally, type. The parameter’s name attribute is
ignored.
Attributes
Attribute
Description
active
Set to true to return only the names of servers that are currently
running. The default is false.
id
(Required.) The variable name of the returned List object.
server
Returns a list of servers on the host on which the specified server is
running.
For example, if your localhost is running the admin, samples, and
default server, and you specify server="default", JRun returns admin
and samples in a List.
You must specify either a
server
or a
host
attribute.
host
Returns a list of all servers on the specified host.
You must specify either a server or a host attribute.
oneOnly
Set to true to return only the name of the first server in the list. The
default is false.
Attribute
Description
id
(Required.) The variable name of the returned object.
type
Specifies the class on which the method is invoked. Required if the
method returns an object.
host
If only
host
is specified, then the JRunAdminService is accessed on
the first running server detected on the host.
If host is specified and service is specified, then the service is accessed
on the first running server detected on the host.