Package com.tnsai.server.hooks
Record Class HookAction
java.lang.Object
java.lang.Record
com.tnsai.server.hooks.HookAction
- Record Components:
type- action type (command or log)command- shell command to execute (for COMMAND type)message- log message (for LOG type); supports${tool}placeholder
Action to execute when a hook fires.
-
Constructor Summary
ConstructorsConstructorDescriptionHookAction(HookActionType type, String command, String message) Creates an instance of aHookActionrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncommand()Returns the value of thecommandrecord component.static HookActionConvenience factory for command actions.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static HookActionConvenience factory for log actions.message()Returns the value of themessagerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
Method Details
-
command
Convenience factory for command actions. -
log
Convenience factory for log actions. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
command
Returns the value of thecommandrecord component.- Returns:
- the value of the
commandrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-