ants.move.core.models.url
Class UrlModel

java.lang.Object
  |
  +--ants.core.Thing
        |
        +--ants.move.core.models.url.UrlModel
All Implemented Interfaces:
ants.core.Model, ants.comm.RemoteEventListener, java.io.Serializable

public class UrlModel
extends ants.core.Thing
implements ants.comm.RemoteEventListener

Implementation of URL model

Version:
1.0
See Also:
Serialized Form

Field Summary
protected  java.util.Vector listeners
           
 
Constructor Summary
UrlModel()
           
 
Method Summary
 void addUrlListener(UrlListener urlL)
          Add new listener
 void catchThing(java.lang.String thingKey)
          Notify to listeners that thing was catched
 void deployThing(java.lang.String thingKey)
          Notify to listeners that a thing was deployed
 void destroy()
          Destroy method
 void eventArrived(java.util.Hashtable evt)
          This method is the standard callback provided for remote events.
 java.lang.String getType()
          Tool type
 java.util.Hashtable getUrlThings()
          Return all Url things in place key=thingKey value=UrlThing class
 void init()
          Initialize model
 void loadThing(java.lang.String thingKey)
          Loads a new thing
 void refreshThing(java.lang.String thingKey)
          Notify to listeners to refresh thing
 void sendRemoveThing(java.lang.String thingKey)
          Send a remove event
 
Methods inherited from class ants.core.Thing
addPropertyChangeListener, addTokenToProperty, getContext, getDescription, getIndexedProperty, getIndexedProperty, getIndexedPropertyNames, getIndexedPropertySize, getName, getPlace, getProperty, getPropertyNames, getThingGateway, getThingId, incrementProperty, init, removePropertyChangeListener, setProperty, triggerEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listeners

protected java.util.Vector listeners
Constructor Detail

UrlModel

public UrlModel()
Method Detail

init

public void init()
Initialize model
Overrides:
init in class ants.core.Thing

addUrlListener

public void addUrlListener(UrlListener urlL)
Add new listener
Parameters:
urlL - Class that implements UrlListener

getUrlThings

public java.util.Hashtable getUrlThings()
Return all Url things in place key=thingKey value=UrlThing class
Returns:
Hashtable that contains all url things in place

catchThing

public void catchThing(java.lang.String thingKey)
Notify to listeners that thing was catched
Parameters:
thingKey - Key of the thing

refreshThing

public void refreshThing(java.lang.String thingKey)
Notify to listeners to refresh thing
Parameters:
thingKey - Key of the thing

loadThing

public void loadThing(java.lang.String thingKey)
Loads a new thing
Parameters:
thingKey - Key of the thing

deployThing

public void deployThing(java.lang.String thingKey)
Notify to listeners that a thing was deployed
Parameters:
thingKey - Key of the thing

sendRemoveThing

public void sendRemoveThing(java.lang.String thingKey)
Send a remove event
Parameters:
thingKey - Key of the thing

eventArrived

public void eventArrived(java.util.Hashtable evt)
Description copied from interface: ants.comm.RemoteEventListener
This method is the standard callback provided for remote events.
Specified by:
eventArrived in interface ants.comm.RemoteEventListener
Overrides:
eventArrived in class ants.core.Thing
Following copied from interface: ants.comm.RemoteEventListener
Parameters:
evt - Remote event.

getType

public java.lang.String getType()
Tool type
Overrides:
getType in class ants.core.Thing
Returns:
URL

destroy

public void destroy()
Destroy method
Overrides:
destroy in class ants.core.Thing


Developers: Oriol Montala, Carles Pairot, Francesc Pinas2000 - 2002
Departament d'Enginyeria Informatica i Matematiques
Escola Tecnica Superior d'Enginyeria
Universitat Rovira i Virgili