agentland.device.intelliCD
Class IntelliCDAgent

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--metaglue.AgentAgent
                          |
                          +--agentland.util.GoodAgent
                                |
                                +--agentland.device.intelliCD.IntelliCDAgent
All Implemented Interfaces:
Agent, Good, IntelliCD, MetagluePrimitives, Remote, Serializable, Spy

public class IntelliCDAgent
extends GoodAgent
implements IntelliCD

See Also:
Serialized Form

Inner classes inherited from class metaglue.AgentAgent
AgentAgent.Attribute
 
Fields inherited from class agentland.util.GoodAgent
alert, notifier
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Fields inherited from interface metaglue.Agent
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING
 
Constructor Summary
IntelliCDAgent()
           
 
Method Summary
 Song currentlyPlaying()
           
 Vector getBestNext(int n, int reaction)
           
 int getRepeatWait()
           
 boolean isPlaying(Song s)
           
 void negativeReaction()
           
 void negativeReaction(Song s)
           
 void neutralReaction()
           
 void neutralReaction(Song s)
           
 void pause()
           
 void pause(Song song)
           
 void play(Song s)
           
 void playBetterSong()
          By calling this method you are saying that you do not like the current song and wish a different song go be played.
 void playNextSong()
           
 Song playNextSong(Song current_song)
           
protected  void playSong(Song s)
           
 void positiveReaction()
           
 void positiveReaction(Song s)
           
 void repeatLastSong()
           
 void saveBrain()
           
 int setAdventureCoef(int ac)
           
 int setRepeatWait(int n)
           
 void showBrain()
           
 void stopPlaying()
           
 void stopPlaying(Song s)
           
 
Methods inherited from class agentland.util.GoodAgent
addSpy, addSpy, alert, alertString, beep, error, getAlert, getHistory, getHistoryElement, getPersistentMap, log, notify, removeSpy, removeSpy, resetHistory, safeRely, safeRely, safeRely, setNiceLogName, tell
 
Methods inherited from class metaglue.AgentAgent
addMonitor, alive, defrost, defrostAll, defrostBoolean, defrostInt, defrostString, fixAttribute, fixAttribute, freeze, freeze, freeze, freezeAll, freezeVar, getAgentID, getAttribute, getCatalog, getCatalogID, getDesignation, getFrozenVariables, getLogLevel, getMetaglueAgent, getMetaglueAgentID, getOccupation, getProperties, getSociety, log, log, lookupClass, obtainMetaglueAgent, obtainMetaglueAgent, obtainMetaglueAgentByName, reliesOn, reliesOn, reliesOn, reliesOnSynch, removeFrozen, replaceExceptionHandler, setFreezeName, setLogLevel, setLogName, shutdown, startAgent, startAgentOn, startAgentOn, startup, status, tiedTo, tiedTo, tiedTo, tiedTo, tieToDesignation, whereAreYou
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface agentland.util.Good
getHistory, getHistoryElement, resetHistory
 
Methods inherited from interface metaglue.Agent
addMonitor, alive, getAgentID, getMetaglueAgentID, shutdown, startup, whereAreYou
 
Methods inherited from interface agentland.util.Spy
tell
 

Constructor Detail

IntelliCDAgent

public IntelliCDAgent()
               throws RemoteException
Method Detail

currentlyPlaying

public Song currentlyPlaying()
                      throws RemoteException
Specified by:
currentlyPlaying in interface IntelliCD

isPlaying

public boolean isPlaying(Song s)
Returns:
true if the given song is currently playing.

play

public void play(Song s)
          throws RemoteException
Specified by:
play in interface IntelliCD

playSong

protected void playSong(Song s)
                 throws RemoteException

pause

public void pause()
           throws RemoteException
Specified by:
pause in interface IntelliCD

pause

public void pause(Song song)
           throws RemoteException
Specified by:
pause in interface IntelliCD

stopPlaying

public void stopPlaying()
                 throws RemoteException
Specified by:
stopPlaying in interface IntelliCD

stopPlaying

public void stopPlaying(Song s)
                 throws RemoteException
Specified by:
stopPlaying in interface IntelliCD

negativeReaction

public void negativeReaction()
                      throws RemoteException
Specified by:
negativeReaction in interface IntelliCD

negativeReaction

public void negativeReaction(Song s)
                      throws RemoteException
Specified by:
negativeReaction in interface IntelliCD

neutralReaction

public void neutralReaction()
                     throws RemoteException
Specified by:
neutralReaction in interface IntelliCD

neutralReaction

public void neutralReaction(Song s)
                     throws RemoteException
Specified by:
neutralReaction in interface IntelliCD

positiveReaction

public void positiveReaction()
                      throws RemoteException
Specified by:
positiveReaction in interface IntelliCD

positiveReaction

public void positiveReaction(Song s)
                      throws RemoteException
Specified by:
positiveReaction in interface IntelliCD

repeatLastSong

public void repeatLastSong()
                    throws RemoteException
Specified by:
repeatLastSong in interface IntelliCD

playBetterSong

public void playBetterSong()
                    throws RemoteException
By calling this method you are saying that you do not like the current song and wish a different song go be played. Negative reaction will be registered.
Specified by:
playBetterSong in interface IntelliCD

playNextSong

public void playNextSong()
                  throws RemoteException
Specified by:
playNextSong in interface IntelliCD

playNextSong

public Song playNextSong(Song current_song)
Specified by:
playNextSong in interface IntelliCD

saveBrain

public void saveBrain()
               throws RemoteException
Specified by:
saveBrain in interface IntelliCD

setAdventureCoef

public int setAdventureCoef(int ac)
                     throws RemoteException
Specified by:
setAdventureCoef in interface IntelliCD

getRepeatWait

public int getRepeatWait()
                  throws RemoteException
Specified by:
getRepeatWait in interface IntelliCD

setRepeatWait

public int setRepeatWait(int n)
                  throws RemoteException
Specified by:
setRepeatWait in interface IntelliCD

getBestNext

public Vector getBestNext(int n,
                          int reaction)
                   throws RemoteException
Specified by:
getBestNext in interface IntelliCD

showBrain

public void showBrain()
               throws RemoteException
Specified by:
showBrain in interface IntelliCD