|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.j2ep.servers.ServerContainerBase
net.sf.j2ep.servers.ClusterContainer
public abstract class ClusterContainer
A ServerContainer implementation that have multiple domains to choose from. When a request is received one server is chosen to handle the request. If the request is linked to a session this server will make sure that it's the domain that created the session that will process this request.
| Nested Class Summary | |
|---|---|
protected class |
ClusterContainer.ClusteredServer
A server in the cluster. |
| Field Summary | |
|---|---|
protected java.util.HashMap |
servers
The servers in our cluster, |
| Constructor Summary | |
|---|---|
ClusterContainer()
Basic constructor |
|
| Method Summary | |
|---|---|
void |
addServer(java.lang.String domainName,
java.lang.String directory)
Will create a new ClusteredServer and add it to the hash map. |
protected abstract ClusterContainer.ClusteredServer |
createNewServer(java.lang.String domainName,
java.lang.String directory)
Will create a new server based on the domainName and the directory. |
protected abstract ClusterContainer.ClusteredServer |
getNextServer()
Returns the next server in out cluster. |
Server |
getServer(HttpServletRequest request)
Checks the request for any session. |
Server |
getServerMapped(java.lang.String location)
Finds a server with the full path specified by the location sent in. |
void |
serverOffline(Server server)
Sets the server to offline status. |
void |
serverOnline(Server server)
Sets the server to online status. |
| Methods inherited from class net.sf.j2ep.servers.ServerContainerBase |
|---|
getRule, setRule |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.HashMap servers
| Constructor Detail |
|---|
public ClusterContainer()
| Method Detail |
|---|
protected abstract ClusterContainer.ClusteredServer createNewServer(java.lang.String domainName,
java.lang.String directory)
domainName - The domaindirectory - The directory
protected abstract ClusterContainer.ClusteredServer getNextServer()
public Server getServer(HttpServletRequest request)
getServer in interface ServerContainernet.sf.j2ep.model.ServerContainer#getServer(javax.servlet.http.HttpServletRequest)public Server getServerMapped(java.lang.String location)
ServerContainer
getServerMapped in interface ServerContainerlocation - The start of a link that a server is mapped to
ServerContainer.getServerMapped(java.lang.String)public void serverOffline(Server server)
serverOffline in interface ServerStatusListenerserver - Server that is now offlineServerStatusListener.serverOffline(net.sf.j2ep.model.Server)public void serverOnline(Server server)
serverOnline in interface ServerStatusListenerserver - Server that is now onlineServerStatusListener.serverOnline(net.sf.j2ep.model.Server)
public void addServer(java.lang.String domainName,
java.lang.String directory)
domainName - The domain name for the new serverdirectory - The director for the new server.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||