|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ContextPool
This is for objects that hold pools of Contexts that represent a pool of potential services. Each implementation of the ContextPool can implement its own method for load balancing and clustering. All Context objects will use the common configuration keys and values from this interface. These key value pairs are stored in the Context's environment.
javax.naming.Context;| Field Summary | |
|---|---|
static java.lang.String |
DOWN_SERVICE_RETRY_WAIT
|
static java.lang.String |
INSTANCE_ID
|
static java.lang.String |
SERVICE_NAME
|
static java.lang.String |
SERVICE_STATUS
|
static java.lang.String |
STATUS_DOWN
|
static java.lang.String |
STATUS_DOWN_DATE
|
static java.lang.String |
STATUS_UNKOWN
|
static java.lang.String |
STATUS_UP
|
| Method Summary | |
|---|---|
void |
addContext(javax.naming.Context ctx)
Add a loaded context to this pool. |
javax.naming.Context |
getAvailableContext()
This is an ORDERED pool. |
javax.naming.Context |
getContext(javax.naming.Context ctx)
Given a context, it will look for the INSTANCE_ID property and find the matching context in the pool. |
javax.naming.Context |
getContext(int i)
Given an index it will return this context from the pool |
javax.naming.Context |
getContext(java.lang.String id)
Given an index it will return this context from the pool |
int |
getNumberOfServices()
|
java.lang.String |
getServiceName()
Getter for property serviceName. |
java.lang.String |
getStatus(javax.naming.Context ctx)
Given a context, it will return the status of this context: STATUS_UNKOWN, STATUS_UP, or STATUS_DOWN |
java.lang.String |
getStatus(int index)
return the status of the instance at the given index |
java.lang.String |
getStatus(java.lang.String id)
return the status of the instance at the given index |
boolean |
markDown(javax.naming.Context ctx)
Given a context, find the matching on in the system (In case this is a copy and not a ref) and then set it to down. |
boolean |
markDown(int index)
Given a context, find the matching on in the system (In case this is a copy and not a ref) and then set it to down. |
boolean |
markDown(java.lang.String id)
Given a context, find the matching on in the system (In case this is a copy and not a ref) and then set it to down. |
boolean |
markUp(javax.naming.Context ctx)
Given a context, find the matching on in the system (In case this is a copy and not a ref) and then set it to down. |
boolean |
markUp(int index)
Given a context, find the matching on in the system (In case this is a copy and not a ref) and then set it to down. |
boolean |
markUp(java.lang.String id)
Given a context, find the matching on in the system (In case this is a copy and not a ref) and then set it to down. |
void |
setServiceName(java.lang.String name)
Setter for property serviceName. |
| Field Detail |
|---|
static final java.lang.String STATUS_DOWN
static final java.lang.String STATUS_UP
static final java.lang.String STATUS_UNKOWN
static final java.lang.String SERVICE_NAME
static final java.lang.String INSTANCE_ID
static final java.lang.String DOWN_SERVICE_RETRY_WAIT
static final java.lang.String SERVICE_STATUS
static final java.lang.String STATUS_DOWN_DATE
| Method Detail |
|---|
java.lang.String getServiceName()
void setServiceName(java.lang.String name)
serviceName - New value of property serviceName.int getNumberOfServices()
javax.naming.Context getContext(int i)
throws javax.naming.NamingException
i - index of the context in the pool
javax.naming.NamingException - if there is no matching Context
javax.naming.Context getContext(java.lang.String id)
throws javax.naming.NamingException
id - (usually the index) of the context
javax.naming.NamingException - if there is no matching Context
javax.naming.Context getContext(javax.naming.Context ctx)
throws javax.naming.NamingException
context - containing the id property.
javax.naming.NamingException - if there is no matching Contextjava.lang.String getStatus(int index)
java.lang.String getStatus(java.lang.String id)
java.lang.String getStatus(javax.naming.Context ctx)
boolean markUp(int index)
index - of the service service context to mark as up
boolean markUp(java.lang.String id)
if - of the service context to mark as up
boolean markUp(javax.naming.Context ctx)
Context, - service context to mark as up
boolean markDown(int index)
index - of the service service context to mark as down
boolean markDown(java.lang.String id)
id - of the service context to mark as down
boolean markDown(javax.naming.Context ctx)
Context, - service context to mark as down
javax.naming.Context getAvailableContext()
throws NoObjectsInPoolException
NoObjectsInPoolException
void addContext(javax.naming.Context ctx)
throws javax.naming.NamingException
javax.naming.NamingException - if we cannot add this context to this pool.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||