org.ow2.jasmine.jadort.api.entities.topology
Class ServerBean

java.lang.Object
  extended by org.ow2.jasmine.jadort.api.entities.topology.ServerBean
All Implemented Interfaces:
java.io.Serializable

public class ServerBean
extends java.lang.Object
implements java.io.Serializable

Bean represents a application server

Author:
Malek Chahine, Remy Bresson, S. Ali Tokmen
See Also:
Serialized Form

Nested Class Summary
static class ServerBean.Type
          Server type.
 
Constructor Summary
ServerBean()
          Default ServerBean constructor
 
Method Summary
 boolean equals(java.lang.Object obj)
          
 int getActiveSessions()
           
 java.util.List<ApplicationBean> getApplications()
          Get the applications list for this server.
 int getCapacity()
          Get the server capacity
 java.lang.Integer getId()
          Get the server id
 boolean getMaintained()
           
 ConnectorBean getManagerConnector()
          Get the server manager connector
 java.lang.String getName()
          Get the server name
 ConnectorBean getServerConnector()
          Get the server connector
 ServerBean getTarget()
           
 ServerBean.Type getType()
           
 VMBean getVm()
          get the VM of the server
 void setActiveSessions(int activeSessions)
           
 void setApplications(java.util.List<ApplicationBean> applications)
          Set the applications list for this server.
 void setCapacity(int capacity)
          Set the server capacity
 void setId(java.lang.Integer id)
          Set the server id
 void setMaintained(boolean maintained)
           
 void setManagerConnector(ConnectorBean managerConnector)
          Set the server manager connector
 void setName(java.lang.String name)
          Set the server name
 void setServerConnector(ConnectorBean serverConnector)
          Set the server connector
 void setTarget(ServerBean target)
           
 void setType(ServerBean.Type type)
           
 void setVm(VMBean vm)
          set the VM of the server
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServerBean

public ServerBean()
Default ServerBean constructor

Method Detail

getId

public java.lang.Integer getId()
Get the server id

Returns:
the server id

setId

public void setId(java.lang.Integer id)
Set the server id

Parameters:
id - the server id

getName

public java.lang.String getName()
Get the server name

Returns:
the server name

setName

public void setName(java.lang.String name)
Set the server name

Parameters:
name - the server name

getCapacity

public int getCapacity()
Get the server capacity

Returns:
the server capacity

setCapacity

public void setCapacity(int capacity)
Set the server capacity

Parameters:
capacity - the server capacity

getServerConnector

public ConnectorBean getServerConnector()
Get the server connector

Returns:
the server connector

setServerConnector

public void setServerConnector(ConnectorBean serverConnector)
Set the server connector

Parameters:
serverConnector - the server connector

getManagerConnector

public ConnectorBean getManagerConnector()
Get the server manager connector

Returns:
the server manager connector

setManagerConnector

public void setManagerConnector(ConnectorBean managerConnector)
Set the server manager connector

Parameters:
serverConnector - the server manager connector

getActiveSessions

public int getActiveSessions()
Returns:
The number of active sessions on this server:
  • If migrating, it corresponds to the number of active sessions on the old version. If no old version, this is set to 0.
  • If maintaining, it corresponds to the number of active sessions on all applications on the server.
This value is re-set every time the object is refreshed on the stateful bean, and not persisted.

setActiveSessions

public void setActiveSessions(int activeSessions)
Parameters:
activeSessions - The number of active sessions on this server:
  • If migrating, it corresponds to the number of active sessions on the old version. If no old version, this is set to 0.
  • If maintaining, it corresponds to the number of active sessions on all applications on the server.
This value is re-set every time the object is refreshed on the stateful bean, and not persisted.

getMaintained

public boolean getMaintained()
Returns:
Whether the server maintain is complete.

getTarget

public ServerBean getTarget()
Returns:
the target migration server.

setMaintained

public void setMaintained(boolean maintained)
Parameters:
maintained - Whether the server maintain is complete.

getType

public ServerBean.Type getType()
Returns:
server type

setType

public void setType(ServerBean.Type type)
Parameters:
type - server type

setTarget

public void setTarget(ServerBean target)
Parameters:
type - target migration server

getVm

public VMBean getVm()
get the VM of the server

Returns:

setVm

public void setVm(VMBean vm)
set the VM of the server

Parameters:
vm - ; the virtual machine on which the server run

getApplications

public java.util.List<ApplicationBean> getApplications()
Get the applications list for this server. That value is re-set every time the operation state changes on the stateful bean, and not persisted.

Returns:
The applications list for this server

setApplications

public void setApplications(java.util.List<ApplicationBean> applications)
Set the applications list for this server. That value is re-set every time the operation state changes on the stateful bean, and not persisted.

Parameters:
applications - The applications list to set for this server

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)

Overrides:
equals in class java.lang.Object
Returns:
true if obj is a ServerBean and the getId() is the same for both objects, false otherwise.


Copyright © 2009 OW2 Consortium. All Rights Reserved.