nl.tudelft.goal.ut2004.visualizer.data
Class AbstractData

Package class diagram package AbstractData
java.lang.Object
  extended by nl.tudelft.goal.ut2004.visualizer.data.AbstractData
Direct Known Subclasses:
GameData, GameStatusData

public abstract class AbstractData
extends Object

Abstract class for data that is gathered from the UnrealServer.

Author:
Lennard de Rijk, M.P. Korstanje

Constructor Summary
AbstractData()
           
 
Method Summary
 void notifyListeners()
          Notifies all the listeners that this AbstractData has been updated.
abstract  void serverChanged(IUT2004Server server)
          Called when ever the server is updated.
 void subscribe(DataUpdateListener listener)
          Add the specified DataUpdateListener to the listeners for this AbstractData object.
 void unsubscribe(DataUpdateListener listener)
          Removes the specified DataUpdateListener from the listeners to this AbstractData object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractData

public AbstractData()
Method Detail

serverChanged

public abstract void serverChanged(IUT2004Server server)
Called when ever the server is updated.

Parameters:
server - the new server or null if the connection was lost.

subscribe

public void subscribe(DataUpdateListener listener)
Add the specified DataUpdateListener to the listeners for this AbstractData object.

Parameters:
listener - The listener that needs to be subscribed

unsubscribe

public void unsubscribe(DataUpdateListener listener)
Removes the specified DataUpdateListener from the listeners to this AbstractData object.

Parameters:
listener - The listener that needs to be removed.

notifyListeners

public void notifyListeners()
Notifies all the listeners that this AbstractData has been updated.

Parameters:
type - The Type of DataUpdateEvent.


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.