edu.ntnu.cikmr.services.context
Class ContextService
java.lang.Object
edu.ntnu.cikmr.services.AbstractService
edu.ntnu.cikmr.services.context.ContextService
- All Implemented Interfaces:
- PeerListener, Service, ServiceListener, java.util.EventListener
public class ContextService
- extends AbstractService
- implements ServiceListener, PeerListener
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ContextService
public ContextService()
addContextItem
public void addContextItem(java.lang.String id,
Relationship r,
ContextItem item)
addEntity
public void addEntity(Entity e)
getAllEntitiesByType
public Entity[] getAllEntitiesByType(java.lang.Class c)
getAllLocalEntitiesByType
public Entity[] getAllLocalEntitiesByType(java.lang.Class c)
getAllRemoteEntitiesByType
public Entity[] getAllRemoteEntitiesByType(java.lang.Class c)
init
public void init(ServiceManager manager)
- Specified by:
init
in interface Service
addListener
public void addListener()
start
public void start(PeerGroup peerGroup)
throws java.io.IOException
- Specified by:
start
in interface Service
- Throws:
java.io.IOException
stop
public void stop()
throws java.io.IOException
- Specified by:
stop
in interface Service
- Throws:
java.io.IOException
isStarted
public boolean isStarted()
- Specified by:
isStarted
in interface Service
serviceStarted
public void serviceStarted(ServiceEvent e)
- Specified by:
serviceStarted
in interface ServiceListener
serviceStopped
public void serviceStopped(ServiceEvent e)
- Specified by:
serviceStopped
in interface ServiceListener
peerAdded
public void peerAdded(PeerEvent e)
- Specified by:
peerAdded
in interface PeerListener
peerRemoved
public void peerRemoved(PeerEvent e)
- Specified by:
peerRemoved
in interface PeerListener
contextChanged
public void contextChanged(ContextEvent contextEvent)