ora.gui.helper
Class MemoryThread

java.lang.Object
  extended by ora.gui.helper.MemoryThread
All Implemented Interfaces:
java.lang.Runnable, RemoteableFeature

public class MemoryThread
extends java.lang.Object
implements java.lang.Runnable, RemoteableFeature

Class is being used in two ways.
The package constructor is used in the UI retrieving current data about the memory load.
The public/default constructor is used as a RemoteableFeature providing remote access to memory data.

Author:
Kristian Martin

Constructor Summary
MemoryThread()
          Constructor being use for remote memory feature
 
Method Summary
 void close()
          Stops thread and may disconnects remote access when used
 Reply connectRemote(DataClient newDc)
          Enables to get memory data from remote JVM
 boolean disconnectRemote(boolean switchToLocal)
          Disables to get memory data from remote but from local JVM
 java.lang.Object getData()
           
 ElementController getElementController()
           
 java.lang.String getKey()
           
 int getRefreshDelay()
           
 DataClient getRemoteDataClient()
           
 CompareableRingList getRinglist()
           
 int getState()
           
 boolean isRunning()
          Gets running flag
 void run()
           
 void setRefreshDelay(int refDelay)
           
 void setState(int nState)
           
 void start()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryThread

public MemoryThread()
Constructor being use for remote memory feature

Method Detail

start

public void start()

getRemoteDataClient

public DataClient getRemoteDataClient()

connectRemote

public Reply connectRemote(DataClient newDc)
                    throws java.lang.Exception
Enables to get memory data from remote JVM

Parameters:
newDc -
Throws:
java.lang.Exception

disconnectRemote

public boolean disconnectRemote(boolean switchToLocal)
Disables to get memory data from remote but from local JVM

Parameters:
switchToLocal -
Returns:
whether disconnected remote

isRunning

public boolean isRunning()
Gets running flag

Returns:
running-flag

close

public void close()
Stops thread and may disconnects remote access when used


getData

public java.lang.Object getData()
Specified by:
getData in interface RemoteableFeature

getKey

public java.lang.String getKey()
Specified by:
getKey in interface RemoteableFeature

run

public void run()
Specified by:
run in interface java.lang.Runnable

setRefreshDelay

public void setRefreshDelay(int refDelay)

getRefreshDelay

public int getRefreshDelay()

getState

public int getState()

setState

public void setState(int nState)

getElementController

public ElementController getElementController()

getRinglist

public CompareableRingList getRinglist()