agentland.device.intelliCD.software
Class SoftwarePlayerAgent

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--metaglue.AgentAgent
                          |
                          +--agentland.device.intelliCD.software.SoftwarePlayerAgent
All Implemented Interfaces:
Agent, MetagluePrimitives, Player, Remote, Serializable, SoftwarePlayer
Direct Known Subclasses:
LiquidAudioPlayerAgent, Mp3PlayerAgent

public class SoftwarePlayerAgent
extends AgentAgent
implements SoftwarePlayer

An agent for playing music via external programs. There are two attributes, `host' (the host on which the agent runs) and `action', which gives the name of the program to execute.

See Also:
AgentAgent, SoftwarePlayer, Serialized Form

Inner classes inherited from class metaglue.AgentAgent
AgentAgent.Attribute
 
Field Summary
protected  Runtime command
           
protected  Process curProcess
           
protected  String host
           
protected  String PLAYER
           
protected  boolean playing
           
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Fields inherited from interface metaglue.Agent
ALIVE, DIED, NO_METAGLUE, NOT_RUNNING, STARTING
 
Constructor Summary
SoftwarePlayerAgent()
           
 
Method Summary
protected  void execPlayer(List args)
           
 void pause()
           
protected  void pauseSong()
           
 void play(Song s)
           
protected  void playSong(String location)
           
 void resume()
           
protected  void resumeSong()
           
protected  boolean runsOnWindows()
           
 void stop()
           
protected  void stopSong()
           
protected  String transformSongLocation(String loc)
           
 
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, 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 metaglue.Agent
addMonitor, alive, getAgentID, getMetaglueAgentID, shutdown, startup, whereAreYou
 

Field Detail

PLAYER

protected String PLAYER

command

protected Runtime command

curProcess

protected Process curProcess

playing

protected boolean playing

host

protected String host
Constructor Detail

SoftwarePlayerAgent

public SoftwarePlayerAgent()
                    throws RemoteException
Method Detail

playSong

protected void playSong(String location)
Parameters:
location - a String value
Throws:
RemoteException - if an error occurs

execPlayer

protected void execPlayer(List args)

transformSongLocation

protected String transformSongLocation(String loc)

play

public void play(Song s)
Specified by:
play in interface Player

stopSong

protected void stopSong()

stop

public void stop()
Specified by:
stop in interface Player

pauseSong

protected void pauseSong()

pause

public void pause()
Specified by:
pause in interface Player

resumeSong

protected void resumeSong()

resume

public void resume()
Specified by:
resume in interface Player

runsOnWindows

protected boolean runsOnWindows()