Interface IMixinPlatformAgent
-
- All Known Subinterfaces:
IMixinPlatformServiceAgent
- All Known Implementing Classes:
MixinPlatformAgentAbstract,MixinPlatformAgentDefault
public interface IMixinPlatformAgentBase interface for platform agents. Platform agents are environment-specific handlers which are used by the Mixin subsystem to perform platform-specific tasks required by different environments without having to litter other parts of the Mixin codebase with a bunch of environment-specific cruft.Platform Agents handle mixin environment tasks on a per-container basis, with each container in the environment being assigned one of each available type of agent to handle those tasks on behalf of the container.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classIMixinPlatformAgent.AcceptResult
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IMixinPlatformAgent.AcceptResultaccept(MixinPlatformManager manager, IContainerHandle handle)Accept and bind to a container handle.java.lang.StringgetPhaseProvider()Get the phase provider for this agentvoidinitPrimaryContainer()Called from inject in the parent tweaker but only called on the primary tweak container.voidinject()Called from inject in the parent tweakervoidprepare()Called during pre-initialisation, after all tweakers and tweak containers have been added to the environment.
-
-
-
Method Detail
-
accept
IMixinPlatformAgent.AcceptResult accept(MixinPlatformManager manager, IContainerHandle handle)
Accept and bind to a container handle. This method is called for agents hosted byMixinContainerand the agent should react accordingly. If the agent is not able to delegate for container handles of the supplied type, this method should return false to indicate that the agent should not be added for this container.- Parameters:
manager- platform manager instancehandle- handle to container- Returns:
- AcceptResult representing this agent's acceptance of the supplied container
-
getPhaseProvider
java.lang.String getPhaseProvider()
Get the phase provider for this agent
-
prepare
void prepare()
Called during pre-initialisation, after all tweakers and tweak containers have been added to the environment.
-
initPrimaryContainer
void initPrimaryContainer()
Called from inject in the parent tweaker but only called on the primary tweak container. This is useful if the agent needs to perform some environment-specific setup just once.
-
inject
void inject()
Called from inject in the parent tweaker
-
-