Class ConnectionHandshakeEventImpl
- java.lang.Object
-
- com.velocitypowered.api.event.connection.ConnectionHandshakeEventImpl
-
- All Implemented Interfaces:
ConnectionHandshakeEvent,Event,ResultedEvent<ResultedEvent.ComponentResult>
public final class ConnectionHandshakeEventImpl extends Object implements ConnectionHandshakeEvent
This event is fired when a handshake is established between a client and the proxy.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.velocitypowered.api.event.ResultedEvent
ResultedEvent.ComponentResult, ResultedEvent.GenericResult, ResultedEvent.Result
-
-
Constructor Summary
Constructors Constructor Description ConnectionHandshakeEventImpl(InboundConnection connection, String originalHostname)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InboundConnectionconnection()StringcurrentHostname()@Nullable SocketAddresscurrentRemoteHostAddress()StringoriginalHostname()ResultedEvent.ComponentResultresult()Returns the result associated with this event.voidsetCurrentHostname(String hostname)voidsetCurrentRemoteHostAddress(@Nullable SocketAddress address)voidsetResult(ResultedEvent.ComponentResult result)Sets the result of this event.StringtoString()
-
-
-
Constructor Detail
-
ConnectionHandshakeEventImpl
public ConnectionHandshakeEventImpl(InboundConnection connection, String originalHostname)
-
-
Method Detail
-
connection
public InboundConnection connection()
- Specified by:
connectionin interfaceConnectionHandshakeEvent
-
currentHostname
public String currentHostname()
- Specified by:
currentHostnamein interfaceConnectionHandshakeEvent
-
originalHostname
public String originalHostname()
- Specified by:
originalHostnamein interfaceConnectionHandshakeEvent
-
setCurrentHostname
public void setCurrentHostname(String hostname)
- Specified by:
setCurrentHostnamein interfaceConnectionHandshakeEvent
-
currentRemoteHostAddress
public @Nullable SocketAddress currentRemoteHostAddress()
- Specified by:
currentRemoteHostAddressin interfaceConnectionHandshakeEvent
-
setCurrentRemoteHostAddress
public void setCurrentRemoteHostAddress(@Nullable SocketAddress address)
- Specified by:
setCurrentRemoteHostAddressin interfaceConnectionHandshakeEvent
-
result
public ResultedEvent.ComponentResult result()
Description copied from interface:ResultedEventReturns the result associated with this event.- Specified by:
resultin interfaceResultedEvent<ResultedEvent.ComponentResult>- Returns:
- the result of this event
-
setResult
public void setResult(ResultedEvent.ComponentResult result)
Description copied from interface:ResultedEventSets the result of this event. The result must be non-null.- Specified by:
setResultin interfaceResultedEvent<ResultedEvent.ComponentResult>- Parameters:
result- the new result
-
-