Record Class SFProxy
java.lang.Object
java.lang.Record
com.soulfiremc.server.proxy.SFProxy
public record SFProxy(@NonNull ProxyType type, @NonNull SocketAddress address, @Nullable String username, @Nullable String password)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionSFProxy(@NonNull ProxyType type, @NonNull SocketAddress address, @Nullable String username, @Nullable String password) Creates an instance of aSFProxyrecord class. -
Method Summary
Modifier and TypeMethodDescription@NonNull SocketAddressaddress()Returns the value of theaddressrecord component.final booleanIndicates whether some other object is "equal to" this one.static SFProxyfromProto(ProxyProto proto) final inthashCode()Returns a hash code value for this object.@Nullable Stringpassword()Returns the value of thepasswordrecord component.toProto()final StringtoString()Returns a string representation of this record class.@NonNull ProxyTypetype()Returns the value of thetyperecord component.@Nullable Stringusername()Returns the value of theusernamerecord component.
-
Constructor Details
-
SFProxy
public SFProxy(@NonNull ProxyType type, @NonNull SocketAddress address, @Nullable String username, @Nullable String password) Creates an instance of aSFProxyrecord class.- Parameters:
type- the value for thetyperecord componentaddress- the value for theaddressrecord componentusername- the value for theusernamerecord componentpassword- the value for thepasswordrecord component
-
-
Method Details
-
fromProto
-
getSocketAddress
-
toProto
-
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). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
address
Returns the value of theaddressrecord component.- Returns:
- the value of the
addressrecord component
-
username
Returns the value of theusernamerecord component.- Returns:
- the value of the
usernamerecord component
-
password
Returns the value of thepasswordrecord component.- Returns:
- the value of the
passwordrecord component
-