Interface Server
- All Superinterfaces:
org.jvnet.hk2.config.ConfigBeanProxy,org.glassfish.api.admin.config.Named,jakarta.validation.Payload,org.jvnet.hk2.config.types.PropertyBag,RefContainer,org.glassfish.api.admin.config.ReferenceContainer,SystemPropertyBag
Each Application Server instance is a Jakarta EE compliant container. One server instance is specially designated as the Administration Server in SE/EE User applications cannot be deployed to an Administration Server instance
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classstatic class -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault voidcreateResourceRef(String enabled, org.glassfish.api.naming.SimpleJndiName refName) default voiddeleteResourceRef(org.glassfish.api.naming.SimpleJndiName refName) default Stringdefault intdefault ApplicationRefgetApplicationRef(String appName) default ClusterReturns the cluster instance this instance is referenced in or null if there is no cluster referencing this server instance.default Config@NotNull @Pattern(regexp="[A-Za-z0-9_][A-Za-z0-9\\-_\\.;]*",message="Pattern: [A-Za-z0-9_][A-Za-z0-9\\-_\\.;]*") StringGets the value of theconfigRefproperty.@Min(1L) StringGets the value of thelbWeightproperty.@Pattern(regexp="[A-Za-z0-9_][A-Za-z0-9\\-_\\.;]*",message="{server.invalid.name}",payload=Server.class) StringgetName()Deprecated.Gets the value of thenodeRefproperty.List<org.jvnet.hk2.config.types.Property>Properties as perPropertyBagdefault Stringdefault ResourceRefgetResourceRef(org.glassfish.api.naming.SimpleJndiName refName) Gets the value of thesystemPropertyproperty.default booleandefault booleanisDas()default booleandefault booleanisResourceRefExists(org.glassfish.api.naming.SimpleJndiName refName) default booleanThis is NOT a reliable test.default booleanisServer()voidsetConfigRef(String configRef) Sets the value of theconfigRefproperty.voidsetLbWeight(String lbWeight) Sets the value of thelbWeightproperty.voidvoidsetNodeAgentRef(String agentRef) Deprecated.voidsetNodeRef(String nodeRef) Sets the value of thenodeRefproperty.Methods inherited from interface org.jvnet.hk2.config.ConfigBeanProxy
createChild, deepCopy, getParent, getParentMethods inherited from interface org.jvnet.hk2.config.types.PropertyBag
addProperty, getProperty, getPropertyValue, getPropertyValue, lookupProperty, removeProperty, removePropertyMethods inherited from interface com.sun.enterprise.config.serverbeans.RefContainer
getApplicationRef, getApplicationRefNames, getResourceRef, getResourceRefNamesMethods inherited from interface com.sun.enterprise.config.serverbeans.SystemPropertyBag
containsProperty, getSystemProperty, getSystemPropertyValue, getSystemPropertyValue
-
Field Details
-
lbEnabledSystemProperty
- See Also:
-
-
Method Details
-
setName
- Specified by:
setNamein interfaceorg.glassfish.api.admin.config.Named- Throws:
PropertyVetoException
-
getName
@Pattern(regexp="[A-Za-z0-9_][A-Za-z0-9\\-_\\.;]*", message="{server.invalid.name}", payload=Server.class) @Pattern(regexp="[A-Za-z0-9_][A-Za-z0-9\\-_\\.;]*",message="{server.invalid.name}",payload=Server.class) String getName()- Specified by:
getNamein interfaceorg.glassfish.api.admin.config.Named
-
getConfigRef
@NotNull @Pattern(regexp="[A-Za-z0-9_][A-Za-z0-9\\-_\\.;]*", message="Pattern: [A-Za-z0-9_][A-Za-z0-9\\-_\\.;]*") @RemoteKey(message="{resourceref.invalid.configref}", type=Config.class) @NotNull @Pattern(regexp="[A-Za-z0-9_][A-Za-z0-9\\-_\\.;]*",message="Pattern: [A-Za-z0-9_][A-Za-z0-9\\-_\\.;]*") String getConfigRef()Gets the value of theconfigRefproperty.Points to a named config. Needed for stand-alone servers. If server instance is part of a cluster, then it points to the cluster config.
- Returns:
- possible object is
String
-
setConfigRef
Sets the value of theconfigRefproperty.- Parameters:
configRef- allowed object isString- Throws:
PropertyVetoException- if a listener vetoes the change
-
getNodeAgentRef
Deprecated.Gets the value of thenodeAgentRefproperty.SE/EE only. Specifies name of node agent where server instance is hosted.
- Returns:
- possible object is
String
-
setNodeAgentRef
Deprecated.Sets the value of thenodeAgentRefproperty.- Parameters:
agentRef- allowed object isString- Throws:
PropertyVetoException- if a listener vetoes the change
-
setNodeRef
Sets the value of thenodeRefproperty.- Parameters:
nodeRef- allowed object isString- Throws:
PropertyVetoException- if a listener vetoes the change
-
getNodeRef
String getNodeRef()Gets the value of thenodeRefproperty.SE/EE only. Specifies name of node agent where server instance is hosted.
- Returns:
- possible object is
String
-
getLbWeight
Gets the value of thelbWeightproperty.Each server instance in a cluster has a weight, which may be used to represent the relative processing capacity of that instance. Default weight is
100for every instance. Weighted load balancing policies will use this weight while load balancing requests within the cluster. It is the responsibility of the administrator to set the relative weights correctly, keeping in mind deployed hardware capacity.- Returns:
- possible object is
String
-
setLbWeight
Sets the value of thelbWeightproperty.- Parameters:
lbWeight- allowed object isString- Throws:
PropertyVetoException- if a listener vetoes the change
-
getSystemProperty
@ToDo(priority=IMPORTANT, details="Provide PropertyDesc for legal system properties") List<SystemProperty> getSystemProperty()Gets the value of thesystemPropertyproperty.This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a
setmethod for thesystemPropertyproperty.For example, to add a new item, do as follows:
getSystemProperty().add(newItem);
Objects of the following type(s) are allowed in the list
SystemProperty- Specified by:
getSystemPropertyin interfaceSystemPropertyBag
-
getProperty
@ToDo(priority=IMPORTANT, details="Provide PropertyDesc for legal props") @PropertiesDesc(props={}) List<org.jvnet.hk2.config.types.Property> getProperty()Properties as perPropertyBag- Specified by:
getPropertyin interfaceorg.jvnet.hk2.config.types.PropertyBag
-
getReference
- Specified by:
getReferencein interfaceorg.glassfish.api.admin.config.ReferenceContainer
-
getResourceRef
-
isResourceRefExists
default boolean isResourceRefExists(org.glassfish.api.naming.SimpleJndiName refName) -
deleteResourceRef
default void deleteResourceRef(org.glassfish.api.naming.SimpleJndiName refName) throws org.jvnet.hk2.config.TransactionFailure - Throws:
org.jvnet.hk2.config.TransactionFailure
-
createResourceRef
default void createResourceRef(String enabled, org.glassfish.api.naming.SimpleJndiName refName) throws org.jvnet.hk2.config.TransactionFailure - Throws:
org.jvnet.hk2.config.TransactionFailure
-
getApplicationRef
-
getCluster
Returns the cluster instance this instance is referenced in or null if there is no cluster referencing this server instance.- Returns:
- the cluster owning this instance or null if this is a standalone instance
-
isCluster
default boolean isCluster()- Specified by:
isClusterin interfaceorg.glassfish.api.admin.config.ReferenceContainer
-
isServer
default boolean isServer()- Specified by:
isServerin interfaceorg.glassfish.api.admin.config.ReferenceContainer
-
isDas
default boolean isDas()- Specified by:
isDasin interfaceorg.glassfish.api.admin.config.ReferenceContainer
-
isInstance
default boolean isInstance()- Specified by:
isInstancein interfaceorg.glassfish.api.admin.config.ReferenceContainer
-
getAdminHost
-
getAdminPort
default int getAdminPort() -
getConfig
-
isRunning
default boolean isRunning()This is NOT a reliable test. It just checks if ANYTHING has setup shop on the host and port. I wanted to run RemoteAdminCommand but that is (inexplicably) in admin/util -- and we would have a circular dependency.
-