|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xoetrope.optional.service.ServiceProxy
public abstract class ServiceProxy
The basis of each element in the service proxy stack.
Copyright (c) Xoetrope Ltd., 2001-2006, see license.txt for details
| Field Summary | |
|---|---|
static java.lang.String |
ARG_OPTION_FALSE
|
static java.lang.String |
ARG_OPTION_TRUE
|
protected boolean |
available
|
static java.lang.Integer |
COMPLETE
The call has ended |
protected XExceptionHandler |
exceptionHandler
|
static java.lang.Integer |
FAILED
The call has failed |
protected ServiceProxy |
nextProxy
The next proxy in the route |
static java.lang.Integer |
OK
Call is OK |
static java.lang.Integer |
PENDING
The call is pending |
static java.lang.String |
RETURN_VALUE
The default service call's return value location in the return params. |
protected java.lang.String |
routeName
The name of the route of which this ServiceProxy is a layer |
protected java.lang.String |
serviceName
The name of the service being called |
protected int |
side
is this instance of the layer on the client or the server? |
static java.lang.Integer |
STARTED
The call has been started |
protected java.lang.Integer |
status
The status of the ServiceProxy call |
| Constructor Summary | |
|---|---|
ServiceProxy()
|
|
| Method Summary | |
|---|---|
java.lang.Object |
call()
Calls call( null, null ) Services should place data they wish to return in the ServiceContext. |
abstract java.lang.Object |
call(java.lang.String method,
ServiceContext context)
Call this proxy with the specified arguments. |
java.lang.Object |
callNextProxy(java.lang.String method,
ServiceContext context,
java.lang.Object ret)
Utility function to call the next ServiceProxy if it is not null. |
protected java.lang.String |
getRouteName()
Retrieve the name of the proxy route. |
protected java.lang.String |
getServiceName()
Retrieves the service name. |
protected int |
getSide()
Retrieve the side of the proxy (Client or Server) |
java.lang.Integer |
getStatus()
Retrieves the current state of the proxy |
boolean |
isAvailable()
Check if the proxy is available |
void |
setAttributes(java.util.Hashtable t)
Set the attributes for this service proxy. |
void |
setAvailable(boolean state)
Set teh available state of the proxy |
void |
setExceptionHandler(XExceptionHandler handler)
Set an exception handler for the ServiceProxy |
void |
setNextProxy(ServiceProxy sp)
Set the next ServiceProxy in the route. |
void |
setRouteName(java.lang.String route)
Set the name of the proxy route |
void |
setServiceName(java.lang.String name)
Sets the proxy service name |
void |
setSide(int activeSide)
Sets the side on which the proxy resides (Client or Server) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.Integer OK
public static final java.lang.Integer STARTED
public static final java.lang.Integer PENDING
public static final java.lang.Integer COMPLETE
public static final java.lang.Integer FAILED
protected java.lang.String routeName
protected java.lang.String serviceName
protected java.lang.Integer status
protected ServiceProxy nextProxy
protected int side
protected XExceptionHandler exceptionHandler
public static final java.lang.String ARG_OPTION_TRUE
public static final java.lang.String ARG_OPTION_FALSE
public static final java.lang.String RETURN_VALUE
protected boolean available
| Constructor Detail |
|---|
public ServiceProxy()
| Method Detail |
|---|
public java.lang.Object call()
throws ServiceProxyException
ServiceProxyException - Throw a ServiceProxyException if there is a problem
public abstract java.lang.Object call(java.lang.String method,
ServiceContext context)
throws ServiceProxyException
context - The ServiceContext contain pass and return parametersmethod - the name of the service being called
ServiceProxyException - Throw an exception if there is a problem with the call
public java.lang.Object callNextProxy(java.lang.String method,
ServiceContext context,
java.lang.Object ret)
throws ServiceProxyException
context - The ServiceContext contain pass and return parametersmethod - the name of the service being calledret - the return object if the next proxy is null
ServiceProxyException - Throw an exception if there is a problem with the callpublic java.lang.Integer getStatus()
public void setSide(int activeSide)
activeSide - the side of the proxyprotected int getSide()
protected java.lang.String getRouteName()
public void setRouteName(java.lang.String route)
route - the route nameprotected java.lang.String getServiceName()
public void setServiceName(java.lang.String name)
name - the proxy service namepublic void setNextProxy(ServiceProxy sp)
sp - the next ServiceProxy in the routepublic void setAttributes(java.util.Hashtable t)
t - The Hashtable of attributes as found in the XML declarationpublic void setExceptionHandler(XExceptionHandler handler)
handler - The XExceptionHandler which will take care of problems.public boolean isAvailable()
public void setAvailable(boolean state)
state - true if the proxy can be used and is available
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||