Java Doc for MessageBuilder.java in  » ESB » open-esb » com » sun » jbi » management » message » 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 » ESB » open esb » com.sun.jbi.management.message 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.jbi.management.message.MessageBuilder

MessageBuilder
public class MessageBuilder (Code)
Helper class to create Management messages
author:
   Sun Microsystems, Inc.

Inner Class :public enum TaskResult
Inner Class :public enum MessageType
Inner Class :public class Message


Constructor Summary
public  MessageBuilder(com.sun.jbi.StringTranslator translator)
    

Method Summary
 StringbuildComponentMessage(ComponentMessageHolder msgObject)
     Return an XML string of the component message(either status or exception message).
public  StringbuildCompositeExceptionMessage(String taskId, java.util.Map<String, Throwable> exceptionMap)
     This method composes a JBI Task Message from the exceptions in the Map.
public  MessagebuildCompositeMessage(String taskId, Map<String, String> responseMap, Map<String, Throwable> exceptionMap, boolean requireAllSuccess)
     This operation combines the data from exception jbi task messages and response jbi task messages.
public  StringbuildExceptionMessage(String taskId, Throwable ex)
     Build a framework task message with exception.
public  StringbuildFrameworkMessage(String taskId, TaskResult taskResult, List<ComponentMessageHolder> compMsgs)
     Build a simple framework task message based on the passed parameters and return the string.
public  StringbuildFrameworkMessage(String taskId, TaskResult taskResult)
     Build a simple framework task message based on the passed parameters and return the string.
public  StringbuildFrameworkMessage(String taskId, TaskResult taskResult, MessageType messageType, String message, String[] params, String token, List<ComponentMessageHolder> compMsgs)
    
public  StringbuildFrameworkMessage(String taskId, TaskResult taskResult, MessageType messageType, String message, String[] params, String token)
     Build a simple framework task message based on the passed parameters and return the string.
public  MessagecreateMessage(String jbiTaskMsg)
    
public static  StringgetMessageString(String message)
     Returns the string from a message entry without the JBIMAxxxx token.
public static  StringgetMessageToken(String message)
     Returns the JBIMAxxxx mesage token from a localized message entry.
public  StringgetStackTrace(Throwable exObj)
    
public  StringgetString(JbiTaskResult jbiTaskMsg)
     Get the string from the management message object.
public  List<ServiceUnitInfo>getSuccessfulServiceUnits(String jbiTaskMsg, List<ServiceUnitInfo> suInfoList)
     Parse the Component Results.
public static  booleanisLocalizedMessage(String message)
    
public static  booleanisXmlString(String str)
     This method is used to check if the given string contains well-formed XML.
public  voidthrowManagementException(String taskId, String msgKey, String[] params)
    


Constructor Detail
MessageBuilder
public MessageBuilder(com.sun.jbi.StringTranslator translator) throws ManagementException(Code)




Method Detail
buildComponentMessage
String buildComponentMessage(ComponentMessageHolder msgObject) throws Exception(Code)
Return an XML string of the component message(either status or exception message).
Parameters:
  msgObject - component message holder object Message as XML string
throws:
  Exception - if unable to build message



buildCompositeExceptionMessage
public String buildCompositeExceptionMessage(String taskId, java.util.Map<String, Throwable> exceptionMap) throws ManagementException(Code)
This method composes a JBI Task Message from the exceptions in the Map. In cases of complete failure what we get back from the remote instance is an exception, which ( hopefully ) has a jbi task message as the message. If the exceptions message is not a jbi task message, then this will build a jbi task message from it. This composition is required only in the complete failure cases.
Parameters:
  exceptionMap - - a map keyed by the instance names and the value is theexception thrown by the remote instance with the MBean exceptions stripped off. a composite JBI Task message that has all the information.



buildCompositeMessage
public Message buildCompositeMessage(String taskId, Map<String, String> responseMap, Map<String, Throwable> exceptionMap, boolean requireAllSuccess) throws ManagementException(Code)
This operation combines the data from exception jbi task messages and response jbi task messages. The primary user of this operation is the facade DeploymentSvc.
Parameters:
  taskId - - task id
Parameters:
  responseMap - - a map of jbi task message responses from instances.
Parameters:
  exceptionMap - - a map of exception task message from instances.
Parameters:
  requireAllSuccess - - this flag indicates how the result of component taskresults for each component from various instances has to be handled. If set to truea Component task result has a task result of SUCCESS only if all the ComponentTaskresults in the response and exception maps are a success.



buildExceptionMessage
public String buildExceptionMessage(String taskId, Throwable ex) throws ManagementException(Code)
Build a framework task message with exception. If the exception message is a jbi task message or a jbi localized message the message is returned as is.
Parameters:
  taskId - - name of the operation which threw the exception
Parameters:
  ex - - the exception



buildFrameworkMessage
public String buildFrameworkMessage(String taskId, TaskResult taskResult, List<ComponentMessageHolder> compMsgs) throws ManagementException(Code)
Build a simple framework task message based on the passed parameters and return the string.



buildFrameworkMessage
public String buildFrameworkMessage(String taskId, TaskResult taskResult) throws ManagementException(Code)
Build a simple framework task message based on the passed parameters and return the string.



buildFrameworkMessage
public String buildFrameworkMessage(String taskId, TaskResult taskResult, MessageType messageType, String message, String[] params, String token, List<ComponentMessageHolder> compMsgs) throws ManagementException(Code)
Build a Framework Message with component task results



buildFrameworkMessage
public String buildFrameworkMessage(String taskId, TaskResult taskResult, MessageType messageType, String message, String[] params, String token) throws ManagementException(Code)
Build a simple framework task message based on the passed parameters and return the string.



createMessage
public Message createMessage(String jbiTaskMsg) throws ManagementException(Code)
Create a message
Parameters:
  jbiTaskMsg - - task message string created Message
throws:
  ManagementException -



getMessageString
public static String getMessageString(String message)(Code)
Returns the string from a message entry without the JBIMAxxxx token.



getMessageToken
public static String getMessageToken(String message)(Code)
Returns the JBIMAxxxx mesage token from a localized message entry.



getStackTrace
public String getStackTrace(Throwable exObj)(Code)
the stack trace of the exception object as a string



getString
public String getString(JbiTaskResult jbiTaskMsg) throws ManagementException(Code)
Get the string from the management message object.



getSuccessfulServiceUnits
public List<ServiceUnitInfo> getSuccessfulServiceUnits(String jbiTaskMsg, List<ServiceUnitInfo> suInfoList) throws ManagementException(Code)
Parse the Component Results. This is based on the fact that the ServiceUnitList obtained from a ServiceAssemblyInfo and the ComponentTaskResults follow the document order of the ServiceUnits in the Service Assembly jbi.xml. The DeploymentService should also append a ComponentTaskResult for each Service Unit in the Service Assembly.



isLocalizedMessage
public static boolean isLocalizedMessage(String message)(Code)
true if the message starts with JBIMA



isXmlString
public static boolean isXmlString(String str)(Code)
This method is used to check if the given string contains well-formed XML.
Parameters:
  str - the string true if the given string is xml



throwManagementException
public void throwManagementException(String taskId, String msgKey, String[] params) throws ManagementException(Code)



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.