Package org.jrd.backend.data
Class VmManager
- java.lang.Object
-
- org.jrd.backend.data.VmManager
-
public class VmManager extends java.lang.Object
This class is used for creating/removing/updating information about available Java Virtual Machines.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.Set<java.awt.event.ActionListener>
actionListeners
(package private) boolean
changed
private static java.util.concurrent.atomic.AtomicInteger
FsVmCounter
private java.util.HashSet<VmInfo>
vmInfoSet
-
Constructor Summary
Constructors Constructor Description VmManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
clearChanged()
VmInfo
createFsVM(java.util.List<java.io.File> cp, java.lang.String name)
VmInfo
createRemoteVM(java.lang.String hostname, int port)
VmInfo
findVmFromPID(java.lang.String param)
VmInfo
getVmInfoByID(java.lang.String VmId)
java.util.HashSet<VmInfo>
getVmInfoSet()
private boolean
hasChanged()
void
notifyListeners()
private void
setChanged()
void
subscribeToVMChange(java.awt.event.ActionListener listener)
void
updateLocalVMs()
Obtains list of Virtual Machines.
-
-
-
Field Detail
-
FsVmCounter
private static java.util.concurrent.atomic.AtomicInteger FsVmCounter
-
vmInfoSet
private java.util.HashSet<VmInfo> vmInfoSet
-
actionListeners
java.util.Set<java.awt.event.ActionListener> actionListeners
-
changed
boolean changed
-
-
Method Detail
-
updateLocalVMs
public void updateLocalVMs()
Obtains list of Virtual Machines. This list is then compared to vmInfoSet. Old Vms are removed and new are added.
-
createRemoteVM
public VmInfo createRemoteVM(java.lang.String hostname, int port)
-
createFsVM
public VmInfo createFsVM(java.util.List<java.io.File> cp, java.lang.String name)
-
findVmFromPID
public VmInfo findVmFromPID(java.lang.String param)
-
getVmInfoByID
public VmInfo getVmInfoByID(java.lang.String VmId)
-
getVmInfoSet
public java.util.HashSet<VmInfo> getVmInfoSet()
-
subscribeToVMChange
public void subscribeToVMChange(java.awt.event.ActionListener listener)
-
notifyListeners
public void notifyListeners()
-
hasChanged
private boolean hasChanged()
-
setChanged
private void setChanged()
-
clearChanged
private void clearChanged()
-
-