All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class calypso.core.atmswitch.SwitchMgmtImpl

java.lang.Object
   |
   +----java.rmi.server.RemoteObject
           |
           +----java.rmi.server.RemoteServer
                   |
                   +----java.rmi.server.UnicastRemoteObject
                           |
                           +----calypso.core.atmswitch.SwitchMgmtImpl

public class SwitchMgmtImpl
extends UnicastRemoteObject
implements SwitchMgmt, SwitchListener, StatisticsListener
This class provides functionality to manage and listen to Switch events. This class contains the remote methods that can be used to configure the FSR-switch with a web browser. It is also a part of a bean model, to keep the configurateing applet posted of the current switch state and statistic information.

Author:
Kim Lahti / TCM laboratory / HUT

Constructor Index

 o SwitchMgmtImpl(String)
Constructs a SwitchMgmtImpl object.

Method Index

 o addPointToMCConnection(int, int, int, int, int)
Tries to add a new point to the multicast connection.
 o createMCConnection(int, int, int)
Tries to create a new multicast connection.
 o createPPConnection(int, int, int, int, int, int)
Tries to create a new point to point connection.
 o endRAndLocalMgmt()
Method that ends the remote and the local mgmt.
 o getInterface(int)
Checks the physical interfaces connected to the FSR port.
 o getMaxVCI(int)
Gets the maximum VCI number.
 o getMaxVPI(int)
Gets the maximum VPI number.
 o getMCConnAmount()
Gets the amount of multicast connections.
 o getMCConnections()
Method to give the connections in text format.
 o getMCConnInfo()
Gets information about the current Multicast connections.
 o getMinVCI(int)
Gets the minumum VCI number.
 o getParameterValue(String)
Gets the Switch value for the requested parameter.
 o getPortAmount()
Getst the amount of ports.
 o getPortType(int)
Gets the type of the port (NNI/UNI).
 o getPPConnAmount()
Gets the amount of point to point connections.
 o getPPConnections()
Mehtod to give the connections in text format.
 o getPPConnInfo()
Gets information about the current Point to Point connections.
 o getStatisticalStartTime()
Gets the Calendar object that was initialized when the switch was initialized, in other words the time when switch was initalized.
 o getStatisticalTotal()
Gets the total amount of cells since switch was started.
 o initSwitch()
Initializes the ATM switch hardware and library functions.
 o interfaceChanged(InterfaceEvent)
This method implements the StatisticsListener interface, as a part of bean model.
 o isLineInSynch(int)
Indicates if the FSR interface card has synchronized to the SDH/STM-1 frame coming from the fiber.
 o isPortActive(int)
Checks if port is active.
 o isSwitchAvailable()
Checks if the fiber between the switch and the control station is working.
 o portTypeChanged(PortTypeEvent)
This method implements the StatisticsListener interface, as a part of bean model.
 o releaseMCConnection(int, int)
Tries to release the multicast connection previesly created.
 o releasePPConnection(int, int)
Tries to release the point to point connection previesly created.
 o resetSwitch()
Resets the switch by releasing all ongoing connections and releasing all the resources.
 o setRMgmtAndUnbind(SwitchRMgmt)
Sets the reference to the client-side (R) management and unbinds this object from registry.
 o setTransferSpeed(boolean, int, int)
Sets the sample rate on one second, the cell transfere values are updated every second (and as before every minute).
 o switchState(SwitchStateEvent)
This method implements the SwitchListener interface, as a part of bean model.
 o value(MinuteEvent)
This method implements the StatisticsListener interface, as a part of bean model.
 o value(SecondEvent)
This method implements the StatisticsListener interface, as a part of bean model.

Constructors

 o SwitchMgmtImpl
 public SwitchMgmtImpl(String serviceName_) throws RemoteException
Constructs a SwitchMgmtImpl object. It adds the new object as listener to the Switch and its SwitchStatistics object, and initializes the vectors where the values, that could not be sent due to an exception, are stored. This method is protected to prevent initialisation from outside of this package.

Methods

 o switchState
 public void switchState(SwitchStateEvent se_)
This method implements the SwitchListener interface, as a part of bean model. This method is executed by the switch every time an SwitchStateEvent occurs, it keeps the client-side applet up to date. If remote method inovacation is impossible, it stores all not updated events into a vector.

 o value
 public void value(SecondEvent se_)
This method implements the StatisticsListener interface, as a part of bean model. This method is executed by the SwitchStatistics every second, it keeps the client-side applet up to date with the cell transferes. If remote method inovacation is impossible, it stores all not updated events into a vector.

 o value
 public void value(MinuteEvent me_)
This method implements the StatisticsListener interface, as a part of bean model. This method is executed by the StatisticsThread every minute, it keeps the client-side applet up to date with the cell transferes. If remote method inovacation is impossible, it stores all not updated events into a vector.

 o interfaceChanged
 public void interfaceChanged(InterfaceEvent ie_)
This method implements the StatisticsListener interface, as a part of bean model. This method is executed by the StatisticsThread when interfaces change, it keeps the client-side applet up to date with what interfaces are connected. If remote method inovacation is impossible, it stores all not updated events into a vector.

 o portTypeChanged
 public void portTypeChanged(PortTypeEvent pte_)
This method implements the StatisticsListener interface, as a part of bean model. This method is executed by SwitchStatistics when port type changes, it keeps the client-side applet up to date with the port type. If remote method inovacation is impossible, it stores all not updated events into a vector.

 o setRMgmtAndUnbind
 public void setRMgmtAndUnbind(SwitchRMgmt srm_) throws RemoteException
Sets the reference to the client-side (R) management and unbinds this object from registry.

 o endRAndLocalMgmt
 public void endRAndLocalMgmt()
Method that ends the remote and the local mgmt.

 o resetSwitch
 public void resetSwitch() throws RemoteException
Resets the switch by releasing all ongoing connections and releasing all the resources.

 o getStatisticalStartTime
 public Calendar getStatisticalStartTime() throws RemoteException
Gets the Calendar object that was initialized when the switch was initialized, in other words the time when switch was initalized.

Returns:
The date object that was inited when the switch was inited.
 o getStatisticalTotal
 public long[][] getStatisticalTotal() throws RemoteException
Gets the total amount of cells since switch was started.

Returns:
The event amounts.
 o setTransferSpeed
 public boolean setTransferSpeed(boolean isEnabled_,
                                 int port_,
                                 int info_) throws RemoteException
Sets the sample rate on one second, the cell transfere values are updated every second (and as before every minute). Checks that the port value is not zero, and returns true if the value is OK and false if not (zero or isEnabled_ = false).

 o getPortType
 public int getPortType(int portNumber_) throws RemoteException
Gets the type of the port (NNI/UNI).

Parameters:
portNumber_ - The number of port investigated.
Returns:
Zero if no port, one if UNI and two if NNI.
 o getInterface
 public int getInterface(int portNumber_) throws RemoteException
Checks the physical interfaces connected to the FSR port.

Parameters:
portNumer_ - The number of the port investigated.
Returns:
integer between 0-4, zero no interface, 1-4 different types.
 o getPortAmount
 public int getPortAmount() throws RemoteException
Getst the amount of ports.

Returns:
the amount of ports.
 o isPortActive
 public boolean isPortActive(int portNumber_) throws RemoteException
Checks if port is active.

Parameters:
portNumber_ - the number of port investigated.
Returns:
true if active false if not.
 o getMaxVPI
 public long getMaxVPI(int portNumber_) throws RemoteException
Gets the maximum VPI number.

 o getMaxVCI
 public long getMaxVCI(int portNumber_) throws RemoteException
Gets the maximum VCI number.

 o getMinVCI
 public long getMinVCI(int portNumber_) throws RemoteException
Gets the minumum VCI number.

 o createPPConnection
 public void createPPConnection(int port1_,
                                int port2_,
                                int VCI1_,
                                int VCI2_,
                                int VPI1_,
                                int VPI2_) throws RemoteException
Tries to create a new point to point connection.

Parameters:
port1_ - A port in the switch, one of the points in the connection.
port2_ - A port in the switch, one of the points in the connection.
VCI1_ - The VCI for port1_.
VCI2_ - The VCI for port2_.
VPI1_ - The VPI for port1_.
VPI2_ - The VPI for port2_.
 o releasePPConnection
 public void releasePPConnection(int index_,
                                 int ID_) throws RemoteException
Tries to release the point to point connection previesly created.

Parameters:
index_ - The position of the connection in the ppConnections vector.
 o getPPConnections
 public DefaultListModel getPPConnections() throws RemoteException
Mehtod to give the connections in text format. This method is invoked by the client when the pp connection display in initialized.

 o createMCConnection
 public void createMCConnection(int port_,
                                int VCI_,
                                int VPI_) throws RemoteException
Tries to create a new multicast connection.

Parameters:
port_ - A port in the switch, the port for the sender.
VCI_ - The VCI for port_.
VPI_ - The VPI for port_.
 o addPointToMCConnection
 public void addPointToMCConnection(int index_,
                                    int ID_,
                                    int port_,
                                    int VCI_,
                                    int VPI_) throws RemoteException
Tries to add a new point to the multicast connection.

Parameters:
index_ - The index of the already created mc connection.
port_ - A port in the switch, a port for the receiver.
VCI_ - The VCI for the port_.
VPI_ - The VPI for the port_.
ID_ - The ID of the connection tried to remove.
 o releaseMCConnection
 public void releaseMCConnection(int index_,
                                 int ID_) throws RemoteException
Tries to release the multicast connection previesly created.

Parameters:
index_ - The position of the connection in the mcConnections vector.
ID_ - The id of the connection that is tried to release.
 o getMCConnections
 public DefaultListModel getMCConnections() throws RemoteException
Method to give the connections in text format. This method is invoked by the client when the mc connection display in initialized.

 o getPPConnAmount
 public int getPPConnAmount() throws RemoteException
Gets the amount of point to point connections.

Returns:
The amount of point to point connections.
 o getMCConnAmount
 public int getMCConnAmount() throws RemoteException
Gets the amount of multicast connections.

Returns:
The amount of multicast connections.
 o getPPConnInfo
 public String[] getPPConnInfo() throws RemoteException
Gets information about the current Point to Point connections.

Returns:
A string array containing information about the connecitons.
 o getMCConnInfo
 public String[] getMCConnInfo() throws RemoteException
Gets information about the current Multicast connections.

Returns:
A string array containing information about the connection.
 o isSwitchAvailable
 public boolean isSwitchAvailable() throws RemoteException
Checks if the fiber between the switch and the control station is working.

Returns:
True if available and false if not.
 o isLineInSynch
 public boolean isLineInSynch(int portNumber_) throws RemoteException
Indicates if the FSR interface card has synchronized to the SDH/STM-1 frame coming from the fiber.

Parameters:
portNumber_ - The number of port investigated.
Returns:
true if in synch and false if not.
 o getParameterValue
 public long getParameterValue(String param_) throws RemoteException
Gets the Switch value for the requested parameter.

Parameters:
param_ - The parameter of the desired value.
 o initSwitch
 public void initSwitch() throws RemoteException
Initializes the ATM switch hardware and library functions. There will be no connections after this method call.


All Packages  Class Hierarchy  This Package  Previous  Next  Index