|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rioproject.opstring.OpString
public class OpString
An implementation of an OperationalString
| Field Summary |
|---|
| Fields inherited from interface org.rioproject.core.OperationalString |
|---|
BROKEN, COMPROMISED, DEPLOYED, INTACT, SCHEDULED, UNDEPLOYED |
| Constructor Summary | |
|---|---|
OpString(String name,
URL loadedFrom)
Create an OpString |
|
| Method Summary | |
|---|---|
void |
addOperationalString(OperationalString opString)
Add included OperationalString to the OperationalString |
void |
addOperationalString(OperationalString[] opStrings)
Add included OperationalString objects to the OperationalString |
void |
addService(ServiceElement sElem)
Add a ServiceElement to the OperationalString. |
boolean |
containsNamedService(String serviceName)
Check if a service with the provided name is included in the OperationalString |
boolean |
containsOperationalString(String opStringName)
Check if an OperationalString with the provided name is included in the OperationalString |
boolean |
equals(Object obj)
An OperationalString is equal to another OperationalString if their names are the same and they have they same ServiceElements |
String |
getName()
All OperationalString instances have a descriptive name. |
ServiceElement |
getNamedService(String serviceName)
Get the service with the provided name |
OperationalString |
getNestedOperationalString(String opStringName)
Get the nested OperationalString with the provided name |
OperationalString[] |
getNestedOperationalStrings()
An OperationalString may contain other OperationalString instances. |
Schedule |
getSchedule()
Get the Schedule for the OperationalString
Scheduling of an OperationalString is part of the OperationalString itself,
the schedule is an optional declarative attribute, and if not declared the
OperationalString will be deployed immediately. |
ServiceElement[] |
getServices()
Get all services contained by this OperationalString as an array of ServiceElement objects |
int |
getStatus()
Get the status of the OperationalString |
int |
hashCode()
Override hashCode to return the hashCode of the name attribute |
URL |
loadedFrom()
Get the location the OperationalString was loaded from. |
void |
removeService(ServiceElement sElem)
Remove a ServiceElement from the OperationalString. |
void |
setDeployed(int deployed)
Set the OperationalString as being scheduled, deployed or undeployed |
void |
setLoadedFrom(URL loadedFrom)
Set the loaded from property |
void |
setName(String name)
Set the name of the OperationalString |
void |
setSchedule(Schedule schedule)
Sets the Schedule for this OperationalString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OpString(String name,
URL loadedFrom)
name - The name of the OperationalString, must not be nullloadedFrom - The URL where the OperationalString was loaded
from. May be null| Method Detail |
|---|
public void setDeployed(int deployed)
OperationalString
setDeployed in interface OperationalStringdeployed - Either OperationalString.SCHEDULED,
OperationalString.DEPLOYED or OperationalString.UNDEPLOYEDOperationalString.setDeployed(int)public int getStatus()
OperationalString
getStatus in interface OperationalStringOperationalString.UNDEPLOYED. If the OperationalString is
OperationalString.DEPLOYED, then the status
will represent the 'weakest link in the chain', that is if this
OperationalString has nested OperationalString instances whose state is
of lesser fidelity (lesser fidelity reflecting a
OperationalString.BROKEN status, highest
fidelity representing an OperationalString.INTACT state) then the
status of this OperationalString must reflect the weakest status. If no nested
OperationalString instances are found, or the OperationalString itself
has a lesser fidelity then it's nested OperationalString instances, the
status is determined by the inspecting ServiceElement instance
availabilityOperationalString.getStatus()public void setName(String name)
name - The name of the OperationalString, must not be null. This
will additionally set all ServiceElement instance OperationalString
names as wellpublic String getName()
OperationalString
getName in interface OperationalStringOperationalString.getName()public ServiceElement[] getServices()
OperationalStringServiceElement objects
getServices in interface OperationalStringOperationalString.getServices()public void addService(ServiceElement sElem)
OperationalStringServiceElement to the OperationalString.
addService in interface OperationalStringsElem - The ServiceElement to addOperationalString.addService(org.rioproject.core.ServiceElement)public void removeService(ServiceElement sElem)
OperationalStringServiceElement from the OperationalString.
removeService in interface OperationalStringsElem - The ServiceElement to removeOperationalString.removeService(org.rioproject.core.ServiceElement)public void addOperationalString(OperationalString[] opStrings)
opStrings - Array of OperationalString objects to addpublic void addOperationalString(OperationalString opString)
opString - OperationalString to addpublic OperationalString[] getNestedOperationalStrings()
OperationalString
getNestedOperationalStrings in interface OperationalStringOperationalString.getNestedOperationalStrings()public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic boolean containsNamedService(String serviceName)
serviceName - The name of the service to check
public ServiceElement getNamedService(String serviceName)
serviceName - The name of the service to check
public boolean containsOperationalString(String opStringName)
opStringName - The name of the OperationalString to check
public OperationalString getNestedOperationalString(String opStringName)
opStringName - The name of the OperationalString to check
public URL loadedFrom()
OperationalString
loadedFrom in interface OperationalStringOperationalString.loadedFrom()public void setSchedule(Schedule schedule)
schedule - the Schedule for this OperationalStringpublic Schedule getSchedule()
OperationalStringSchedule for the OperationalString
Scheduling of an OperationalString is part of the OperationalString itself, the schedule is an optional declarative attribute, and if not declared the OperationalString will be deployed immediately. The following properties describe the Schedule :
This DeploymentSchedule produces the following:
Once the DeploymentSchedule element is parsed, a Schedule object is created
and set to the enclosing OperationalString object.
getSchedule in interface OperationalStringOperationalString.getSchedule()public void setLoadedFrom(URL loadedFrom)
loadedFrom - The URL the OperationalString was loaded from
|
Copyright © Rio Project. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||