public class CapabilitiesSupportedListEvent extends ServerMultipleMessageEventBase implements CapabilityNegotiationRequestEvent
CapabilityManager,
CapabilityRequestCommand| Constructor and Description |
|---|
CapabilitiesSupportedListEvent(@NonNull Client client,
@NonNull List<ServerMessage> sourceMessages,
boolean negotiating,
@NonNull List<CapabilityState> supportedCapabilities)
Constructs the event.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRequest(@NonNull String capability)
Add a capability to be requested following this event.
|
@NonNull List<String> |
getRequests()
Gets the capabilities to be requested.
|
@NonNull List<CapabilityState> |
getSupportedCapabilities()
Gets a list of capabilities the server supports.
|
boolean |
isEndingNegotiation()
Gets if negotiation should end after this event fires, which can be
changed via this event.
|
boolean |
isNegotiating()
Gets if this event is fired during capability negotiation.
|
void |
setEndingNegotiation(boolean endNegotiation)
Sets if negotiation should end after this event fires.
|
protected @NonNull ToStringer |
toStringer()
Generates a partial
ToStringer for the command. |
getSourcegetClient, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetClientpublic CapabilitiesSupportedListEvent(@NonNull Client client, @NonNull List<ServerMessage> sourceMessages, boolean negotiating, @NonNull List<CapabilityState> supportedCapabilities)
client - the clientsourceMessages - source messagesnegotiating - if we are negotiating right nowsupportedCapabilities - supported capabilitiespublic void addRequest(@NonNull String capability)
CapabilityNegotiationRequestEventaddRequest in interface CapabilityNegotiationRequestEventcapability - capability to be requestedpublic @NonNull List<String> getRequests()
CapabilityNegotiationRequestEventgetRequests in interface CapabilityNegotiationRequestEventpublic @NonNull List<CapabilityState> getSupportedCapabilities()
public final boolean isEndingNegotiation()
CapabilityNegotiationResponseEventisEndingNegotiation in interface CapabilityNegotiationResponseEventCapabilityNegotiationResponseEvent.setEndingNegotiation(boolean)public final boolean isNegotiating()
CapabilityNegotiationResponseEventisNegotiating in interface CapabilityNegotiationResponseEventpublic final void setEndingNegotiation(boolean endNegotiation)
CapabilityNegotiationResponseEventCapabilityNegotiationResponseEvent.isNegotiating() is true,
the connection will not complete.setEndingNegotiation in interface CapabilityNegotiationResponseEventendNegotiation - true if negotiation should end, false if notprotected @NonNull ToStringer toStringer()
ClientEventBaseToStringer for the command.toStringer in class ServerMultipleMessageEventBaseCopyright © 2013–2021 Kitteh. All rights reserved.