Java Doc for RmiClientInterceptorUtils.java in  » J2EE » spring-framework-2.0.6 » org » springframework » remoting » rmi » 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.0.6 » org.springframework.remoting.rmi 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.springframework.remoting.rmi.RmiClientInterceptorUtils

RmiClientInterceptorUtils
abstract public class RmiClientInterceptorUtils (Code)
Factored-out methods for performing invocations within an RMI client. Can handle both RMI and non-RMI service interfaces working on an RMI stub.

Note: This is an SPI class, not intended to be used by applications.
author:
   Juergen Hoeller
since:
   1.1





Method Summary
public static  ExceptionconvertRmiAccessException(Method method, Throwable ex, String message)
     Wrap the given arbitrary exception that happened during remote access in either a RemoteException or a Spring RemoteAccessException (if the method signature does not support RemoteException).
public static  ExceptionconvertRmiAccessException(Method method, RemoteException ex, String serviceName)
     Convert the given RemoteException that happened during remote access to Spring's RemoteAccessException if the method signature does not support RemoteException.
public static  ExceptionconvertRmiAccessException(Method method, RemoteException ex, boolean isConnectFailure, String serviceName)
     Convert the given RemoteException that happened during remote access to Spring's RemoteAccessException if the method signature does not support RemoteException.
public static  ObjectdoInvoke(MethodInvocation invocation, Remote stub)
     Perform a raw method invocation on the given RMI stub, letting reflection exceptions through as-is.
public static  Objectinvoke(MethodInvocation invocation, Remote stub, String serviceName)
     Apply the given method invocation to the given RMI stub.

Delegate to the corresponding method if the RMI stub does not directly implemented the invoked method.

public static  booleanisConnectFailure(RemoteException ex)
     Determine whether the given RMI exception indicates a connect failure.



Method Detail
convertRmiAccessException
public static Exception convertRmiAccessException(Method method, Throwable ex, String message)(Code)
Wrap the given arbitrary exception that happened during remote access in either a RemoteException or a Spring RemoteAccessException (if the method signature does not support RemoteException).

Only call this for remote access exceptions, not for exceptions thrown by the target service itself!
Parameters:
  method - the invoked method
Parameters:
  ex - the exception that happened, to be used as cause for theRemoteAccessException or RemoteException
Parameters:
  message - the message for the RemoteAccessException respectivelyRemoteException the exception to be thrown to the caller




convertRmiAccessException
public static Exception convertRmiAccessException(Method method, RemoteException ex, String serviceName)(Code)
Convert the given RemoteException that happened during remote access to Spring's RemoteAccessException if the method signature does not support RemoteException. Else, return the original RemoteException.
Parameters:
  method - the invoked method
Parameters:
  ex - the RemoteException that happened
Parameters:
  serviceName - the name of the service (for debugging purposes) the exception to be thrown to the caller



convertRmiAccessException
public static Exception convertRmiAccessException(Method method, RemoteException ex, boolean isConnectFailure, String serviceName)(Code)
Convert the given RemoteException that happened during remote access to Spring's RemoteAccessException if the method signature does not support RemoteException. Else, return the original RemoteException.
Parameters:
  method - the invoked method
Parameters:
  ex - the RemoteException that happened
Parameters:
  isConnectFailure - whether the given exception should be considereda connect failure
Parameters:
  serviceName - the name of the service (for debugging purposes) the exception to be thrown to the caller



doInvoke
public static Object doInvoke(MethodInvocation invocation, Remote stub) throws InvocationTargetException(Code)
Perform a raw method invocation on the given RMI stub, letting reflection exceptions through as-is.
Parameters:
  invocation - the AOP MethodInvocation
Parameters:
  stub - the RMI stub the invocation result, if any
throws:
  InvocationTargetException - if thrown by reflection



invoke
public static Object invoke(MethodInvocation invocation, Remote stub, String serviceName) throws Throwable(Code)
Apply the given method invocation to the given RMI stub.

Delegate to the corresponding method if the RMI stub does not directly implemented the invoked method. This typically happens when a non-RMI service interface is used for an RMI service. The methods of such a service interface have to match the RMI stub methods, but they typically don't declare java.rmi.RemoteException: A RemoteException thrown by the RMI stub will be automatically converted to Spring's RemoteAccessException.
Parameters:
  invocation - the AOP MethodInvocation
Parameters:
  stub - the RMI stub
Parameters:
  serviceName - the name of the service (for debugging purposes) the invocation result, if any
throws:
  Throwable - exception to be thrown to the caller
See Also:   java.rmi.RemoteException
See Also:   org.springframework.remoting.RemoteAccessException




isConnectFailure
public static boolean isConnectFailure(RemoteException ex)(Code)
Determine whether the given RMI exception indicates a connect failure.

Treats RMI's ConnectException, ConnectIOException, UnknownHostException, NoSuchObjectException, StubNotFoundException, MarshalException and UnmarshalException as connect failure, as well as Oracle's OC4J com.evermind.server.rmi.RMIConnectionException (which doesn't derive from from any well-known RMI connect exception).
Parameters:
  ex - the RMI exception to check whether the exception should be treated as connect failure
See Also:   java.rmi.ConnectException
See Also:   java.rmi.ConnectIOException
See Also:   java.rmi.UnknownHostException
See Also:   java.rmi.NoSuchObjectException
See Also:   java.rmi.StubNotFoundException
See Also:   java.rmi.MarshalException
See Also:   java.rmi.UnmarshalException




Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.