public abstract class AbstractPlatform<SENDER,C extends PlatformSettings> extends java.lang.Object implements Platform<SENDER,C>
| Modifier and Type | Field and Description |
|---|---|
protected java.util.Map<java.lang.String,CommandRoute<SENDER>> |
commandRoutes |
protected PlatformSenderFactory<SENDER> |
senderFactory |
protected C |
settings |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractPlatform(C settings,
PlatformSenderFactory<SENDER> senderFactory) |
| Modifier and Type | Method and Description |
|---|---|
PlatformSender |
createSender(SENDER nativeSender) |
C |
getConfiguration() |
PlatformSenderFactory<SENDER> |
getSenderFactory() |
protected abstract void |
hook(CommandRoute<SENDER> commandRoute,
PlatformInvocationListener<SENDER> invocationHook,
PlatformSuggestionListener<SENDER> suggestionHook) |
void |
register(CommandRoute<SENDER> commandRoute,
PlatformInvocationListener<SENDER> invocationHook,
PlatformSuggestionListener<SENDER> suggestionHook) |
void |
setConfiguration(C liteConfiguration) |
protected abstract void |
unhook(CommandRoute<SENDER> commandRoute) |
void |
unregister(CommandRoute<SENDER> commandRoute) |
void |
unregisterAll() |
@NotNull protected C extends PlatformSettings settings
protected final PlatformSenderFactory<SENDER> senderFactory
protected final java.util.Map<java.lang.String,CommandRoute<SENDER>> commandRoutes
protected AbstractPlatform(@NotNull
C settings,
PlatformSenderFactory<SENDER> senderFactory)
public void setConfiguration(@NotNull
C liteConfiguration)
setConfiguration in interface Platform<SENDER,C extends PlatformSettings>@NotNull public C getConfiguration()
getConfiguration in interface Platform<SENDER,C extends PlatformSettings>public PlatformSenderFactory<SENDER> getSenderFactory()
getSenderFactory in interface Platform<SENDER,C extends PlatformSettings>public PlatformSender createSender(SENDER nativeSender)
createSender in interface Platform<SENDER,C extends PlatformSettings>public final void register(CommandRoute<SENDER> commandRoute, PlatformInvocationListener<SENDER> invocationHook, PlatformSuggestionListener<SENDER> suggestionHook)
register in interface Platform<SENDER,C extends PlatformSettings>public final void unregister(CommandRoute<SENDER> commandRoute)
unregister in interface Platform<SENDER,C extends PlatformSettings>public final void unregisterAll()
unregisterAll in interface Platform<SENDER,C extends PlatformSettings>protected abstract void hook(CommandRoute<SENDER> commandRoute, PlatformInvocationListener<SENDER> invocationHook, PlatformSuggestionListener<SENDER> suggestionHook)
protected abstract void unhook(CommandRoute<SENDER> commandRoute)