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