|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.remoting.jaxrpc.LocalJaxRpcServiceFactory org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor
Interceptor for accessing a specific port of a JAX-RPC service. Uses either LocalJaxRpcServiceFactory's facilities underneath, or takes an explicit reference to an existing JAX-RPC Service instance, for example looked up via JndiObjectFactoryBean.
Allows to set JAX-RPC's standard stub properties directly, via the "username", "password", "endpointAddress" and "maintainSession" properties.
This invoker is typically used with an RMI service interface. Alternatively, this invoker can also proxy a JAX-RPC service with a matching non-RMI business interface, i.e. an interface that mirrors the RMI service methods but does not declare RemoteExceptions. In the latter case, RemoteExceptions thrown by the JAX-RPC stub will automatically get converted to Spring's unchecked RemoteAccessException.
If exposing the JAX-RPC port interface (i.e. an RMI interface) directly, setting "serviceInterface" is sufficient. If exposing a non-RMI business interface, the business interface needs to be set as "serviceInterface", and the JAX-RPC port interface as "portInterface".
Service.getPort(javax.xml.namespace.QName, java.lang.Class)
,
Stub
,
RemoteAccessException
,
JndiObjectFactoryBean
Field Summary |
Fields inherited from class org.springframework.remoting.jaxrpc.LocalJaxRpcServiceFactory |
logger |
Constructor Summary | |
JaxRpcPortClientInterceptor()
|
Method Summary | |
void |
afterPropertiesSet()
Create and initialize the JAX-RPC proxy for the specified port. |
java.util.Properties |
getCustomProperties()
Return custom properties to be set on the stub for the port. |
java.lang.String |
getEndpointAddress()
|
javax.xml.rpc.Service |
getJaxRpcService()
Return a reference to an existing JAX-RPC Service instance, if any. |
java.lang.String |
getPassword()
|
java.lang.Class |
getPortInterface()
Return the JAX-RPC port interface to use. |
java.lang.String |
getPortName()
Return the name of the port. |
java.rmi.Remote |
getPortProxy()
Return the underlying JAX-RPC port proxy that this interceptor delegates to. |
java.lang.Class |
getServiceInterface()
Return the interface of the service that this factory should create a proxy for. |
java.lang.String |
getUsername()
|
java.lang.Object |
invoke(org.aopalliance.intercept.MethodInvocation invocation)
|
boolean |
isMaintainSession()
|
protected void |
postProcessJaxRpcService(javax.xml.rpc.Service service)
Post-process the given JAX-RPC Service. |
protected void |
postProcessPortProxy(java.rmi.Remote portProxy)
Post-process the given JAX-RPC port proxy. |
void |
setCustomProperties(java.util.Properties customProperties)
Set custom properties to be set on the stub for the port. |
void |
setEndpointAddress(java.lang.String endpointAddress)
|
void |
setJaxRpcService(javax.xml.rpc.Service jaxRpcService)
Set a reference to an existing JAX-RPC Service instance, for example looked up via JndiObjectFactoryBean. |
void |
setMaintainSession(boolean maintainSession)
|
void |
setPassword(java.lang.String password)
|
void |
setPortInterface(java.lang.Class portInterface)
Set the JAX-RPC port interface to use. |
void |
setPortName(java.lang.String portName)
Set the name of the port. |
void |
setServiceInterface(java.lang.Class serviceInterface)
Set the interface of the service that this factory should create a proxy for. |
void |
setUsername(java.lang.String username)
|
Methods inherited from class org.springframework.remoting.jaxrpc.LocalJaxRpcServiceFactory |
createJaxRpcService, createServiceFactory, getNamespaceUri, getQName, getServiceFactoryClass, getServiceName, getWsdlDocumentUrl, setNamespaceUri, setServiceFactoryClass, setServiceName, setWsdlDocumentUrl |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JaxRpcPortClientInterceptor()
Method Detail |
public void setJaxRpcService(javax.xml.rpc.Service jaxRpcService)
JndiObjectFactoryBean
public javax.xml.rpc.Service getJaxRpcService()
public void setPortName(java.lang.String portName)
public java.lang.String getPortName()
public void setUsername(java.lang.String username)
public java.lang.String getUsername()
public void setPassword(java.lang.String password)
public java.lang.String getPassword()
public void setEndpointAddress(java.lang.String endpointAddress)
public java.lang.String getEndpointAddress()
public void setMaintainSession(boolean maintainSession)
public boolean isMaintainSession()
public void setCustomProperties(java.util.Properties customProperties)
Stub._setProperty(java.lang.String, java.lang.Object)
public java.util.Properties getCustomProperties()
public void setServiceInterface(java.lang.Class serviceInterface)
The interface must be suitable for a JAX-RPC port, it "portInterface" is not set. Else, it must match the methods in the port interface but can be a non-RMI business interface.
setPortInterface(java.lang.Class)
public java.lang.Class getServiceInterface()
public void setPortInterface(java.lang.Class portInterface)
The interface must be suitable for a JAX-RPC port.
setServiceInterface(java.lang.Class)
public java.lang.Class getPortInterface()
public void afterPropertiesSet() throws javax.xml.rpc.ServiceException
afterPropertiesSet
in interface InitializingBean
javax.xml.rpc.ServiceException
protected void postProcessJaxRpcService(javax.xml.rpc.Service service)
service
- the current JAX-RPC ServiceService.getTypeMappingRegistry()
protected void postProcessPortProxy(java.rmi.Remote portProxy)
portProxy
- the current JAX-RPC port proxypublic java.rmi.Remote getPortProxy()
public java.lang.Object invoke(org.aopalliance.intercept.MethodInvocation invocation) throws java.lang.Throwable
invoke
in interface org.aopalliance.intercept.MethodInterceptor
java.lang.Throwable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |