AnyLogic
Expand
Font size
All Superinterfaces:
Serializable
All Known Subinterfaces:
ExtAgentContinuous, ExtAgentDiscrete, ExtAgentGIS, ExtAgentInteractive, ExtAgentWithSpatialMetrics, ExtAnimationParams, ExtDefaultAnimationProvider, ExtEntity, ExtEnvironmentContinuous, ExtEnvironmentDiscrete, ExtEnvironmentGIS, ExtEnvironmentInteractive, ExtEnvironmentWithLayout, ExtEnvironmentWithMetrics, ExtRootModelAgent, ExtSpace
All Known Implementing Classes:
AgentExtensionImpl, ExtAgentContinuousDelegate, ExtAgentWithSpatialMetricsDelegate, ExtEntityContinuousDelegate, ExtEntityDelegate

@AnyLogicInternalCodegenAPI
public interface AgentExtension
extends Serializable
Base interface for extensions of Agents.
Author:
AnyLogic North America, LLC https://anylogic.com

Field Summary

Modifier and TypeFieldDescription
static final intP_AGENT_INTERACTIVE_DELEGATE 
static final intP_AGENT_WITH_SPATIAL_METRICS_DELEGATE 
static final intP_AGENT_WITH_SPECIFIC_SPACE 
static final intP_AGENT_WITH_SPECIFIC_SPACE_DELEGATE 
static final intP_ENTITY_DELEGATE 
static final intP_ENV_WITH_SPECIFIC_SPACE 
static final intP_ROOT 
static final intP_SPACE 
static final intP_USER_EXT 

Method Summary

Modifier and TypeMethodDescription
AgentgetAgent()
Returns the agent this extension belongs to
AgentExtensionnext_xjal()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future
voidonDestroy()
This method is called when the owner of this extension is destroyed.
Should be overridden when custom destroy is required.
Default implementation does nothing
voidonExtensionRemoved(AgentExtension ext)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
Callback invoked when some other agent extension is removed.
intpriority()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
This function is used for sorting extensions (in order for the overriding delegation to work)
voidsetNext_xjal(AgentExtension next)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future
booleansupportsInterface_xjal(Class<?> itfs)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.

Field Details

P_AGENT_WITH_SPECIFIC_SPACE

@AnyLogicInternalAPI
static final int P_AGENT_WITH_SPECIFIC_SPACE
See Also:
Constant Field Values

P_AGENT_WITH_SPECIFIC_SPACE_DELEGATE

@AnyLogicInternalAPI
static final int P_AGENT_WITH_SPECIFIC_SPACE_DELEGATE
See Also:
Constant Field Values

P_AGENT_WITH_SPATIAL_METRICS_DELEGATE

@AnyLogicInternalAPI
static final int P_AGENT_WITH_SPATIAL_METRICS_DELEGATE
See Also:
Constant Field Values

P_AGENT_INTERACTIVE_DELEGATE

@AnyLogicInternalAPI
static final int P_AGENT_INTERACTIVE_DELEGATE
See Also:
Constant Field Values

P_ENTITY_DELEGATE

@AnyLogicInternalAPI
static final int P_ENTITY_DELEGATE
See Also:
Constant Field Values

P_ENV_WITH_SPECIFIC_SPACE

@AnyLogicInternalAPI
static final int P_ENV_WITH_SPECIFIC_SPACE
See Also:
Constant Field Values

P_USER_EXT

@AnyLogicInternalAPI
static final int P_USER_EXT
See Also:
Constant Field Values

P_ROOT

@AnyLogicInternalAPI
static final int P_ROOT
See Also:
Constant Field Values

P_SPACE

@AnyLogicInternalAPI
static final int P_SPACE
See Also:
Constant Field Values

Method Details

next_xjal

@AnyLogicInternalAPI
AgentExtension next_xjal()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future

setNext_xjal

@AnyLogicInternalAPI
void setNext_xjal(AgentExtension next)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future

getAgent

Agent getAgent()
Returns the agent this extension belongs to
Returns:
the agent this extension belongs to

onDestroy

@AnyLogicInternalAPI
void onDestroy()
This method is called when the owner of this extension is destroyed.
Should be overridden when custom destroy is required.
Default implementation does nothing

supportsInterface_xjal

@AnyLogicInternalAPI
boolean supportsInterface_xjal(Class<?> itfs)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.

priority

@AnyLogicInternalAPI
int priority()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
This function is used for sorting extensions (in order for the overriding delegation to work)
Returns:
int value, see also P_* constants

onExtensionRemoved

@AnyLogicInternalAPI
void onExtensionRemoved(AgentExtension ext)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
Callback invoked when some other agent extension is removed. Invoked for all extensions (including the removed one). Note that onDestroy() isn't called when extension is removed.
Parameters:
ext - the extension which has just been removed