Package com.structurizr.model
Class StaticStructureElementInstance
java.lang.Object
com.structurizr.model.ModelItem
com.structurizr.model.Element
com.structurizr.model.GroupableElement
com.structurizr.model.DeploymentElement
com.structurizr.model.StaticStructureElementInstance
- All Implemented Interfaces:
PropertyHolder
- Direct Known Subclasses:
ContainerInstance
,SoftwareSystemInstance
Represents a deployment instance of a
SoftwareSystem
or Container
, which can be added to a DeploymentNode
.-
Field Summary
Fields inherited from class com.structurizr.model.DeploymentElement
DEFAULT_DEPLOYMENT_ENVIRONMENT, DEFAULT_DEPLOYMENT_GROUP
-
Method Summary
Modifier and TypeMethodDescriptionaddHealthCheck
(String name, String url) Adds a new health check, with the default interval (60 seconds) and timeout (0 milliseconds).addHealthCheck
(String name, String url, int interval, long timeout) Adds a new health check.Gets the deployment group of this element instance.abstract StaticStructureElement
Gets the set of health checks associated with this element instance.int
Gets the instance ID of this element instance.getName()
Gets the name of this element.boolean
Removes the given tag.void
uses
(InfrastructureNode destination, String description, String technology) Adds a relationship between this element instance and an infrastructure node.uses
(InfrastructureNode destination, String description, String technology, InteractionStyle interactionStyle) Adds a relationship between this element instance and an infrastructure node.uses
(InfrastructureNode destination, String description, String technology, InteractionStyle interactionStyle, String[] tags) Adds a relationship between this element instance and an infrastructure node.Methods inherited from class com.structurizr.model.DeploymentElement
getEnvironment, getParent
Methods inherited from class com.structurizr.model.GroupableElement
getGroup, setGroup
Methods inherited from class com.structurizr.model.Element
getDescription, getEfferentRelationshipsWith, getEfferentRelationshipWith, getEfferentRelationshipWith, getModel, getRelationships, hasAfferentRelationships, hasEfferentRelationshipWith, hasEfferentRelationshipWith, setDescription, setModel, toString, uses, uses, uses
Methods inherited from class com.structurizr.model.ModelItem
addPerspective, addProperty, addTags, getCanonicalName, getId, getPerspectives, getProperties, getTags, getTagsAsSet, getUrl, hasTag, setUrl
-
Method Details
-
getElement
-
getDeploymentGroups
Gets the deployment group of this element instance.- Returns:
- a deployment group name
-
getInstanceId
public int getInstanceId()Gets the instance ID of this element instance.- Returns:
- the instance ID, an integer greater than zero
-
getDefaultTags
- Specified by:
getDefaultTags
in classModelItem
-
removeTag
Description copied from class:ModelItem
Removes the given tag. -
getName
Description copied from class:Element
Gets the name of this element. -
setName
-
getHealthChecks
Gets the set of health checks associated with this element instance.- Returns:
- a Set of HttpHealthCheck instances
-
addHealthCheck
Adds a new health check, with the default interval (60 seconds) and timeout (0 milliseconds).- Parameters:
name
- the name of the health checkurl
- the URL of the health check- Returns:
- a HttpHealthCheck instance representing the health check that has been added
- Throws:
IllegalArgumentException
- if the name is empty, or the URL is not a well-formed URL
-
addHealthCheck
Adds a new health check.- Parameters:
name
- the name of the health checkurl
- the URL of the health checkinterval
- the polling interval, in secondstimeout
- the timeout, in milliseconds- Returns:
- a HttpHealthCheck instance representing the health check that has been added
- Throws:
IllegalArgumentException
- if the name is empty, the URL is not a well-formed URL, or the interval/timeout is not zero/a positive integer
-
uses
Adds a relationship between this element instance and an infrastructure node.- Parameters:
destination
- the destination InfrastructureNodedescription
- a short description of the relationshiptechnology
- the technology- Returns:
- a Relationship object
-
uses
public Relationship uses(InfrastructureNode destination, String description, String technology, InteractionStyle interactionStyle) Adds a relationship between this element instance and an infrastructure node.- Parameters:
destination
- the destination InfrastructureNodedescription
- a short description of the relationshiptechnology
- the technologyinteractionStyle
- the interaction style (Synchronous vs Asynchronous)- Returns:
- a Relationship object
-
uses
public Relationship uses(InfrastructureNode destination, String description, String technology, InteractionStyle interactionStyle, String[] tags) Adds a relationship between this element instance and an infrastructure node.- Parameters:
destination
- the destination InfrastructureNodedescription
- a short description of the relationshiptechnology
- the technologyinteractionStyle
- the interaction style (Synchronous vs Asynchronous)tags
- an array of tags- Returns:
- a Relationship object
-