|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.domain.DomainObject
com.arsdigita.web.Host
This class represents info about a single host running a server in a webapp cluster.
Field Summary | |
static String |
BASE_DATA_OBJECT_TYPE
|
static String |
ID
|
static String |
SERVER_NAME
|
static String |
SERVER_PORT
|
Fields inherited from class com.arsdigita.domain.DomainObject |
versionId |
Constructor Summary | |
protected |
Host()
|
|
Host(DataObject dobj)
|
protected |
Host(String type)
|
Method Summary | |
static Host |
create(String serverName,
int serverPort)
Creates a new host |
static Host |
findByServerName(String serverName)
Find a Host object for a given server. |
BigDecimal |
getID()
|
String |
getServerName()
|
int |
getServerPort()
|
URL |
getURL()
|
URL |
getURL(String path,
ParameterMap params)
|
URL |
getURL(String scheme,
String path,
ParameterMap params)
|
void |
initialize()
Called from all of the DomainObject constructors
to initalize or validate the new domain object or its
encapsulated data object. |
static Host |
retrieve(BigDecimal id)
Retrieves the host with a given id |
static Host |
retrieve(HttpHost hhost)
Finds a host using fields from the given HttpHost . |
static DomainCollection |
retrieveAll()
Retrieves the collection of hosts associated with this server. |
void |
setServerName(String name)
|
void |
setServerPort(int port)
|
String |
toString()
Return the OID plus the flags N,M,D,U depending on
whether the object is new, modified, deleted, or unknown. |
Methods inherited from class com.arsdigita.domain.DomainObject |
add, add, addToAssociation, afterDelete, afterSave, beforeDelete, beforeSave, clear, delete, disconnect, equals, get, getBaseDataObjectType, getObjectType, getOID, getSession, hashCode, isDeleted, isDisconnected, isModified, isNew, isPropertyModified, isValid, remove, remove, remove, removeFromAssociation, save, set, setAssociation, setAssociation, specializeDataObject, specializeDataObject |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String BASE_DATA_OBJECT_TYPE
public static final String ID
public static final String SERVER_NAME
public static final String SERVER_PORT
Constructor Detail |
protected Host()
protected Host(String type)
public Host(DataObject dobj)
Method Detail |
public void initialize()
DomainObject
DomainObject
constructors
to initalize or validate the new domain object or its
encapsulated data object. This was introduced in order to
support efficient validation of the encapsualted data object's
type. If the validation is typically performed in class
constructors, then redundant validation is performed in
superclass constructors. This validation now occurs here.
initialize
in class DomainObject
public static Host create(String serverName, int serverPort)
serverName
- the fully qualified server hostnameserverPort
- the HTTP port numberpublic static Host retrieve(BigDecimal id)
id
- the host idpublic static final DomainCollection retrieveAll()
DomainCollection
of Hosts
;
it cannot be nullpublic static Host retrieve(HttpHost hhost)
HttpHost
.
Host
that corresponds to
hhost
or null if the host is not foundpublic static Host findByServerName(String serverName)
serverName
- the fully qualified host name, excluding port
DataObjectNotFoundException
- if no host exists with that namepublic BigDecimal getID()
public String getServerName()
public void setServerName(String name)
public int getServerPort()
public void setServerPort(int port)
public String toString()
DomainObject
OID
plus the flags N,M,D,U depending on
whether the object is new, modified, deleted, or unknown. Unknown is for
objects that have been invalidated.
toString
in class DomainObject
public URL getURL()
public URL getURL(String path, ParameterMap params)
public URL getURL(String scheme, String path, ParameterMap params)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |