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
 ConnectorBean getManagerConnector()
          Get the server manager connector
 java.lang.String getName()
          Get the server name
 boolean getProcessed()
           
 ConnectorBean getServerConnector()
          Get the server connector
 ServerBean getTarget()
           
 ServerBean.Type getType()
           
 VMBean getVm()
          Get the VM this server is running on
 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 setManagerConnector(ConnectorBean managerConnector)
          Set the server manager connector
 void setName(java.lang.String name)
          Set the server name
 void setProcessed(boolean processed)
           
 void setServerConnector(ConnectorBean serverConnector)
          Set the server connector
 void setTarget(ServerBean target)
           
 void setType(ServerBean.Type type)
           
 void setVm(VMBean vm)
          Set the VM this server is running on
 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 operation is in the Step.SELECT_SERVERS step or is currently maintaining, gets the number of active sessions on all applications on the server.
  • Else (therefore, if executing maintenance) gets the number of active sessions on the old version. If no old version is present, sets the number of active sessions to 0.
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 operation is in the Step.SELECT_SERVERS step or is currently maintaining, gets the number of active sessions on all applications on the server.
  • Else (therefore, if executing maintenance) gets the number of active sessions on the old version. If no old version is present, sets the number of active sessions to 0.
This value is re-set every time the object is refreshed on the stateful bean, and not persisted.

getProcessed

public boolean getProcessed()
Returns:
Whether the server process (maintenance or migration) is complete.

getTarget

public ServerBean getTarget()
Returns:
the Target server (used when maintaining with a switch to another server configuration).

setProcessed

public void setProcessed(boolean processed)
Parameters:
processed - Whether the server process (maintenance or migration) 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:
target - Target server (used when maintaining with a switch to another server configuration)

getVm

public VMBean getVm()
Get the VM this server is running on

Returns:
VM the server is running on

setVm

public void setVm(VMBean vm)
Set the VM this server is running on

Parameters:
vm - VM the server is running on

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 © 2010 OW2 Consortium. All Rights Reserved.