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

Variable Index

 o channelSrv
Reference to the object holding channel information.
 o localHost
Variable holding the name of the current switch controlling host.
 o RMIport
Port number to which the rmi registry service is attached.

Constructor Index

 o TVInit()
Constructor definition for TVInit.

Method Index

 o addChannel(String, InetAddress)
Adds a new free channel to the ChannelServer
 o addChannel(String, InetAddress, boolean, float, String)
Adds a new channel to the ChannelServer
 o getConnectionDescr(String)
Gets Virtual channel connection descriptor for a named channel
 o invokeService(InetAddress)
The invokeService method.
 o main(String[])
The main method of TVInit is responsible for starting up a TVAgent.
 o removeAgent(ControlTV)
Removes a reference to an agent from the ChannelServer
 o removeChannel(String)
Removes a channel

Variables

 o localHost
 protected static String localHost
Variable holding the name of the current switch controlling host.

 o RMIport
 protected static int RMIport
Port number to which the rmi registry service is attached.

 o channelSrv
 protected static ChannelServer channelSrv
Reference to the object holding channel information.

Constructors

 o TVInit
 public TVInit() throws RemoteException
Constructor definition for TVInit.

Throws: RemoteException
Something wrong with the remote interface access.

Methods

 o 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.
 o 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
 o 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
 o removeChannel
 public void removeChannel(String name_) throws RemoteException
Removes a channel

Parameters:
name_ - Name of the channel to be removed
 o removeAgent
 public void removeAgent(ControlTV agent_) throws RemoteException
Removes a reference to an agent from the ChannelServer

Parameters:
agent_ - The agent to be removed
 o 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
 o 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