Java Doc for HttpInvokerClientInterceptor.java in  » J2EE » spring-framework-2.5 » org » springframework » remoting » httpinvoker » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » spring framework 2.5 » org.springframework.remoting.httpinvoker 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.springframework.remoting.support.RemoteInvocationBasedAccessor
   org.springframework.remoting.httpinvoker.HttpInvokerClientInterceptor

All known Subclasses:   org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean,
HttpInvokerClientInterceptor
public class HttpInvokerClientInterceptor extends RemoteInvocationBasedAccessor implements MethodInterceptor,HttpInvokerClientConfiguration,BeanClassLoaderAware(Code)
org.aopalliance.intercept.MethodInterceptor for accessing an HTTP invoker service. The service URL must be an HTTP URL exposing an HTTP invoker service.

Serializes remote invocation objects and deserializes remote invocation result objects. Uses Java serialization just like RMI, but provides the same ease of setup as Caucho's HTTP-based Hessian and Burlap protocols.

HTTP invoker is a very extensible and customizable protocol. It supports the RemoteInvocationFactory mechanism, like RMI invoker, allowing to include additional invocation attributes (for example, a security context). Furthermore, it allows to customize request execution via the HttpInvokerRequestExecutor strategy.

Can use the JDK's java.rmi.server.RMIClassLoader to load classes from a given HttpInvokerClientInterceptor.setCodebaseUrl codebase , performing on-demand dynamic code download from a remote location. The codebase can consist of multiple URLs, separated by spaces. Note that RMIClassLoader requires a SecurityManager to be set, analogous to when using dynamic class download with standard RMI! (See the RMI documentation for details.)
author:
   Juergen Hoeller
since:
   1.1
See Also:   HttpInvokerClientInterceptor.setServiceUrl
See Also:   HttpInvokerClientInterceptor.setCodebaseUrl
See Also:   HttpInvokerClientInterceptor.setRemoteInvocationFactory
See Also:   HttpInvokerClientInterceptor.setHttpInvokerRequestExecutor
See Also:   HttpInvokerServiceExporter
See Also:   HttpInvokerProxyFactoryBean
See Also:   java.rmi.server.RMIClassLoader





Method Summary
public  voidafterPropertiesSet()
    
protected  RemoteAccessExceptionconvertHttpInvokerAccessException(Throwable ex)
     Convert the given HTTP invoker access exception to an appropriate Spring RemoteAccessException.
protected  RemoteInvocationResultexecuteRequest(RemoteInvocation invocation)
     Execute the given remote invocation via the HttpInvokerRequestExecutor.

Can be overridden in subclasses to pass a different configuration object to the executor.

final protected  ClassLoadergetBeanClassLoader()
     Return the ClassLoader that this accessor operates in, to be used for deserializing and for generating proxies.
public  StringgetCodebaseUrl()
     Return the codebase URL to download classes from if not found locally.
public  HttpInvokerRequestExecutorgetHttpInvokerRequestExecutor()
     Return the HttpInvokerRequestExecutor used by this remote accessor.
public  Objectinvoke(MethodInvocation methodInvocation)
    
public  voidsetBeanClassLoader(ClassLoader classLoader)
    
public  voidsetCodebaseUrl(String codebaseUrl)
     Set the codebase URL to download classes from if not found locally. Can consists of multiple URLs, separated by spaces.

Follows RMI's codebase conventions for dynamic class download. In contrast to RMI, where the server determines the URL for class download (via the "java.rmi.server.codebase" system property), it's the client that determines the codebase URL here.

public  voidsetHttpInvokerRequestExecutor(HttpInvokerRequestExecutor httpInvokerRequestExecutor)
     Set the HttpInvokerRequestExecutor implementation to use for executing remote invocations.

Default is SimpleHttpInvokerRequestExecutor .




Method Detail
afterPropertiesSet
public void afterPropertiesSet()(Code)



convertHttpInvokerAccessException
protected RemoteAccessException convertHttpInvokerAccessException(Throwable ex)(Code)
Convert the given HTTP invoker access exception to an appropriate Spring RemoteAccessException.
Parameters:
  ex - the exception to convert the RemoteAccessException to throw



executeRequest
protected RemoteInvocationResult executeRequest(RemoteInvocation invocation) throws Exception(Code)
Execute the given remote invocation via the HttpInvokerRequestExecutor.

Can be overridden in subclasses to pass a different configuration object to the executor. Alternatively, add further configuration properties in a subclass of this accessor: By default, the accessor passed itself as configuration object to the executor.
Parameters:
  invocation - the RemoteInvocation to execute the RemoteInvocationResult object
throws:
  IOException - if thrown by I/O operations
throws:
  ClassNotFoundException - if thrown during deserialization
throws:
  Exception - in case of general errors
See Also:   HttpInvokerClientInterceptor.getHttpInvokerRequestExecutor
See Also:   HttpInvokerClientConfiguration




getBeanClassLoader
final protected ClassLoader getBeanClassLoader()(Code)
Return the ClassLoader that this accessor operates in, to be used for deserializing and for generating proxies.



getCodebaseUrl
public String getCodebaseUrl()(Code)
Return the codebase URL to download classes from if not found locally.



getHttpInvokerRequestExecutor
public HttpInvokerRequestExecutor getHttpInvokerRequestExecutor()(Code)
Return the HttpInvokerRequestExecutor used by this remote accessor.

Creates a default SimpleHttpInvokerRequestExecutor if no executor has been initialized already.




invoke
public Object invoke(MethodInvocation methodInvocation) throws Throwable(Code)



setBeanClassLoader
public void setBeanClassLoader(ClassLoader classLoader)(Code)



setCodebaseUrl
public void setCodebaseUrl(String codebaseUrl)(Code)
Set the codebase URL to download classes from if not found locally. Can consists of multiple URLs, separated by spaces.

Follows RMI's codebase conventions for dynamic class download. In contrast to RMI, where the server determines the URL for class download (via the "java.rmi.server.codebase" system property), it's the client that determines the codebase URL here. The server will usually be the same as for the service URL, just pointing to a different path there.
See Also:   HttpInvokerClientInterceptor.setServiceUrl
See Also:   org.springframework.remoting.rmi.CodebaseAwareObjectInputStream
See Also:   java.rmi.server.RMIClassLoader




setHttpInvokerRequestExecutor
public void setHttpInvokerRequestExecutor(HttpInvokerRequestExecutor httpInvokerRequestExecutor)(Code)
Set the HttpInvokerRequestExecutor implementation to use for executing remote invocations.

Default is SimpleHttpInvokerRequestExecutor . Alternatively, consider using CommonsHttpInvokerRequestExecutor for more sophisticated needs.
See Also:   SimpleHttpInvokerRequestExecutor
See Also:   CommonsHttpInvokerRequestExecutor




Methods inherited from org.springframework.remoting.support.RemoteInvocationBasedAccessor
protected RemoteInvocation createRemoteInvocation(MethodInvocation methodInvocation)(Code)(Java Doc)
public RemoteInvocationFactory getRemoteInvocationFactory()(Code)(Java Doc)
protected Object recreateRemoteInvocationResult(RemoteInvocationResult result) throws Throwable(Code)(Java Doc)
public void setRemoteInvocationFactory(RemoteInvocationFactory remoteInvocationFactory)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.