com.almende.eve.state
Class AbstractState

java.lang.Object
  extended by com.almende.eve.state.AbstractState
All Implemented Interfaces:
State, Map<String,Object>
Direct Known Subclasses:
FileState, MemoryState

public abstract class AbstractState
extends Object
implements State

Author:
jos

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
protected  String agentId
           
 
Fields inherited from interface com.almende.eve.state.State
KEY_AGENT_TYPE
 
Constructor Summary
AbstractState()
          The implemented classes must have a public constructor
AbstractState(String agentId)
          The implemented classes must have this public constructor with parameters agentFactory, and agentId
 
Method Summary
abstract  void destroy()
           
 String getAgentId()
          Get the agents id
 Class<?> getAgentType()
          Get the configured agents type (the full class path).
abstract  void init()
           
 void setAgentType(Class<?> agentType)
          Set the configured agents class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.almende.eve.state.State
putIfUnchanged
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Field Detail

agentId

protected String agentId
Constructor Detail

AbstractState

public AbstractState()
The implemented classes must have a public constructor


AbstractState

public AbstractState(String agentId)
The implemented classes must have this public constructor with parameters agentFactory, and agentId

Method Detail

getAgentId

public String getAgentId()
Get the agents id

Specified by:
getAgentId in interface State
Returns:
agentId

setAgentType

public void setAgentType(Class<?> agentType)
Set the configured agents class.

Specified by:
setAgentType in interface State

getAgentType

public Class<?> getAgentType()
                      throws ClassNotFoundException
Get the configured agents type (the full class path).

Specified by:
getAgentType in interface State
Returns:
type
Throws:
ClassNotFoundException

init

public abstract void init()
Specified by:
init in interface State

destroy

public abstract void destroy()
Specified by:
destroy in interface State


Copyright © 2013 Almende BV. All Rights Reserved.