public class LogMapMark extends Object implements Serializable
LogCategory to place mark on the map.
This is an object that is passed through log infrastructure to appear on the other side
through JMX and it is utilized there to add mark on the map.
Basically, if you want to use it directly (DON'T), create LogMapMark using some of
the create*Event method and pass it to log as parameter of log message.
// create a mark that with text "text to show in map" that will be
// shown at the position of agent for its duration of 2secibds.
logger.info("Text to log" , new Object[]{LogMapMark.createFixedLengthEvent(Level.INFO, "text to show in map", null, 2000)});
| Modifier and Type | Class and Description |
|---|---|
static class |
LogMapMark.Type |
| Modifier and Type | Method and Description |
|---|---|
static LogMapMark |
createAgentFixedLengthEvent(Level level,
String message,
long duration)
Create map mark that appear in the map for certain time and will be always shown
at the current position of agent.
|
static LogMapMark |
createAgentVariableLengthEvent(Level level,
String message)
Create mark that will always be shown at the position of agent.
|
static LogMapMark |
createFixedLengthEvent(Level level,
String message,
Location location,
long duration)
Create mark on the map that will stay there for some time.
|
static LogMapMark |
createVariableLengthEvent(Level level,
String message,
Location location)
Create starting map mark.
|
boolean |
equals(Object otherObject) |
long |
getCreated() |
long |
getDuration() |
LogMapMark |
getEndMark()
Get end mark to make some map mark disappear from map.
|
int |
getId()
Get unique id of this map mark
|
Level |
getLevel()
Get level of mark, used mainly to send end marks at same level as starting.
|
Location |
getLocation()
Get location of mark.
|
Location |
getLocation(Location entityLoc)
Get location, where mark is supposed to be.
|
String |
getMessage() |
LogMapMark.Type |
getType() |
int |
hashCode() |
public static LogMapMark createFixedLengthEvent(Level level, String message, Location location, long duration)
level - level of mark, should be same as the level of carrying LogRecordmessage - text of map marklocation - location, at which map mark should be located. If null, than mark will follow agent.duration - how long should map mark be shown in the map.public static LogMapMark createAgentFixedLengthEvent(Level level, String message, long duration)
level - level of mark, should be same as the level of carrying LogRecordmessage - text of markduration - how long should be mark shownpublic static LogMapMark createAgentVariableLengthEvent(Level level, String message)
getEndMark() on the starting mark (the one
returned by this method).level - level of mark, should be same as the level of carrying LogRecordmessage - text to be shownpublic static LogMapMark createVariableLengthEvent(Level level, String message, Location location)
getEndMark() on the starting mark (the one
returned by this method) and pass it to same log as starting mark.message - text of marklocation - location, at which map mark should be located. If null, than mark will follow agent.public int getId()
public Level getLevel()
public String getMessage()
public Location getLocation()
getLocation(cz.cuni.amis.pogamut.base3d.worldview.object.Location)public Location getLocation(Location entityLoc)
entityLoc - location of agent this map mark belongs topublic long getCreated()
public long getDuration()
public LogMapMark.Type getType()
public LogMapMark getEndMark()
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.