Record Class WebConfig
java.lang.Object
java.lang.Record
net.simplace.sim.wrapper.web.WebConfig
- Record Components:
user- login namepassword- login password
Settings of the web client, read from its properties file (web.properties, see web.properties.template next to
WebServer). Keys:
web.user,web.password- login of the browser (Basic-Auth); both required
- Author:
- Andreas Enders, Claude (Anthropic), co-author
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringProperties file read if no other is given, in the working directory of the process. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static WebConfigReads the settings.password()Returns the value of thepasswordrecord component.toString()Returns a string representation of this record class.user()Returns the value of theuserrecord component.
-
Field Details
-
DEFAULT_FILE
Properties file read if no other is given, in the working directory of the process.- See Also:
-
-
Constructor Details
-
WebConfig
-
-
Method Details
-
load
Reads the settings. The file is read as UTF-8 (a byte order mark is skipped).- Parameters:
aFile- the properties file- Returns:
- the settings
- Throws:
IOException- if the file cannot be readIllegalStateException- if the file is missing or user or password are not set
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
user
-
password
-