All Packages Class Hierarchy This Package Previous Next Index
Class calypso.services.tv.TVInit
java.lang.Object
|
+----java.rmi.server.RemoteObject
|
+----java.rmi.server.RemoteServer
|
+----java.rmi.server.UnicastRemoteObject
|
+----calypso.services.tv.TVInit
- public class TVInit
- extends UnicastRemoteObject
- implements InitTVAgent
TV agent initializing class.
Instance of this class gives access to creating new agent objects as
new clients open their viewer applications.
- Author:
- Juha Pääjärvi, Olli-Pekka Auvinen / TCM laboratory / HUT
-
channelSrv
- Reference to the object holding channel information.
-
localHost
- Variable holding the name of the current switch controlling host.
-
RMIport
- Port number to which the rmi registry service is attached.
-
TVInit()
- Constructor definition for TVInit.
-
addChannel(String, InetAddress)
- Adds a new free channel to the ChannelServer
-
addChannel(String, InetAddress, boolean, float, String)
- Adds a new channel to the ChannelServer
-
getConnectionDescr(String)
- Gets Virtual channel connection descriptor for a named channel
-
invokeService(InetAddress)
- The invokeService method.
-
main(String[])
- The main method of TVInit is responsible for starting up a TVAgent.
-
removeAgent(ControlTV)
- Removes a reference to an agent from the ChannelServer
-
removeChannel(String)
- Removes a channel
localHost
protected static String localHost
- Variable holding the name of the current switch controlling host.
RMIport
protected static int RMIport
- Port number to which the rmi registry service is attached.
channelSrv
protected static ChannelServer channelSrv
- Reference to the object holding channel information.
TVInit
public TVInit() throws RemoteException
- Constructor definition for TVInit.
- Throws: RemoteException
- Something wrong with the remote interface access.
invokeService
public ControlTV invokeService(InetAddress clientIP_) throws RemoteException
- The invokeService method.
Creates a new TVAgent instance. Client can use it's TVAgent instance
to control the TV service (for example change channel).
- Parameters:
- clientIP_ - The IP address of the client holding the viewer.
- Returns:
- ControlTV A reference to the new agent instance.
- Throws: RemoteException
- Something wrong with the remote interface access.
addChannel
public void addChannel(String name_,
InetAddress senderIP_,
boolean payChannel_,
float feePerHour_,
String passwd_) throws RemoteException
- Adds a new channel to the ChannelServer
- Parameters:
- name_ - Name of the new channel to be added
- senderIP_ - IP address of the server providing with the new
channel
- payChannel_ -
true
if channel is not free of
charge
addChannel
public void addChannel(String name_,
InetAddress senderIP_) throws RemoteException
- Adds a new free channel to the ChannelServer
- Parameters:
- name_ - Name of the new channel to be added
- senderIP_ - IP address of the server providing with the new
channel
removeChannel
public void removeChannel(String name_) throws RemoteException
- Removes a channel
- Parameters:
- name_ - Name of the channel to be removed
removeAgent
public void removeAgent(ControlTV agent_) throws RemoteException
- Removes a reference to an agent from the ChannelServer
- Parameters:
- agent_ - The agent to be removed
getConnectionDescr
public VCConnectionDescr getConnectionDescr(String channelName_) throws RemoteException
- Gets Virtual channel connection descriptor for a named channel
- Parameters:
- channelName_ - The name of the channel
- Returns:
- VCConnectionDescr describing the connection
main
public static void main(String argv_[])
- The main method of TVInit is responsible for starting up a TVAgent.
- Parameters:
- argv_ - An array holding the command line arguments.
All Packages Class Hierarchy This Package Previous Next Index