public class DefaultCapabilityManager extends Object implements CapabilityManager.WithManagement
CapabilityManager
.CapabilityManager.Defaults, CapabilityManager.WithManagement
Constructor and Description |
---|
DefaultCapabilityManager(Client client)
Constructs the capability manager.
|
Modifier and Type | Method and Description |
---|---|
void |
endNegotiation()
Ends negotiation status, making
CapabilityManager.WithManagement.isNegotiating() false. |
@NonNull List<CapabilityState> |
getCapabilities()
Gets capabilities currently enabled.
|
@NonNull List<CapabilityState> |
getSupportedCapabilities()
Gets capabilities supported by the server.
|
boolean |
isNegotiating()
Gets if we are still in negotiation.
|
void |
reset()
Resets.
|
void |
setCapabilities(@NonNull List<CapabilityState> capabilityStates)
Wipes the previously known active capabilities, setting only those
in the provided list.
|
void |
setSupportedCapabilities(@NonNull List<CapabilityState> capabilityStates)
Sets the supported capabilities as reported by the server.
|
@NonNull String |
toString() |
void |
updateCapabilities(@NonNull List<CapabilityState> capabilityStates)
Updates the current active capabilities, adding new and removing
any labeled with
CapabilityState.isDisabled() . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCapability, getSupportedCapability
public DefaultCapabilityManager(Client client)
client
- client for which this manager will operatepublic void reset()
Resettable
reset
in interface Resettable
public @NonNull List<CapabilityState> getCapabilities()
CapabilityManager
getCapabilities
in interface CapabilityManager
CapabilityRequestCommand
public @NonNull List<CapabilityState> getSupportedCapabilities()
CapabilityManager
getSupportedCapabilities
in interface CapabilityManager
CapabilityRequestCommand
public boolean isNegotiating()
CapabilityManager.WithManagement
Resettable.reset()
.isNegotiating
in interface CapabilityManager.WithManagement
public void endNegotiation()
CapabilityManager.WithManagement
CapabilityManager.WithManagement.isNegotiating()
false.endNegotiation
in interface CapabilityManager.WithManagement
public void updateCapabilities(@NonNull List<CapabilityState> capabilityStates)
CapabilityManager.WithManagement
CapabilityState.isDisabled()
.updateCapabilities
in interface CapabilityManager.WithManagement
capabilityStates
- capability statespublic void setCapabilities(@NonNull List<CapabilityState> capabilityStates)
CapabilityManager.WithManagement
setCapabilities
in interface CapabilityManager.WithManagement
capabilityStates
- fresh set of capability statespublic void setSupportedCapabilities(@NonNull List<CapabilityState> capabilityStates)
CapabilityManager.WithManagement
setSupportedCapabilities
in interface CapabilityManager.WithManagement
capabilityStates
- supported capabilitiesCopyright © 2013–2021 Kitteh. All rights reserved.