Java Code Examples for javax.activation.MailcapCommandMap#getAllCommands()
The following examples show how to use
javax.activation.MailcapCommandMap#getAllCommands() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BindingImpl.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
private static boolean cmdMapInitialized(MailcapCommandMap mailMap) { CommandInfo[] commands = mailMap.getAllCommands("text/xml"); if (commands == null || commands.length == 0) { return false; } // SAAJ RI implements it's own DataHandlers which can be used for JAX-WS too; // see com.sun.xml.internal.messaging.saaj.soap.AttachmentPartImpl#initializeJavaActivationHandlers // so if found any of SAAJ or our own handler registered, we are ok; anyway using SAAJ directly here // is not good idea since we don't want standalone JAX-WS to depend on specific SAAJ impl. // This is also reason for duplication of Handler's code by JAX-WS String saajClassName = "com.sun.xml.internal.messaging.saaj.soap.XmlDataContentHandler"; String jaxwsClassName = "com.sun.xml.internal.ws.encoding.XmlDataContentHandler"; for (CommandInfo command : commands) { String commandClass = command.getCommandClass(); if (saajClassName.equals(commandClass) || jaxwsClassName.equals(commandClass)) { return true; } } return false; }
Example 2
Source File: BindingImpl.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
private static boolean cmdMapInitialized(MailcapCommandMap mailMap) { CommandInfo[] commands = mailMap.getAllCommands("text/xml"); if (commands == null || commands.length == 0) { return false; } // SAAJ RI implements it's own DataHandlers which can be used for JAX-WS too; // see com.sun.xml.internal.messaging.saaj.soap.AttachmentPartImpl#initializeJavaActivationHandlers // so if found any of SAAJ or our own handler registered, we are ok; anyway using SAAJ directly here // is not good idea since we don't want standalone JAX-WS to depend on specific SAAJ impl. // This is also reason for duplication of Handler's code by JAX-WS String saajClassName = "com.sun.xml.internal.messaging.saaj.soap.XmlDataContentHandler"; String jaxwsClassName = "com.sun.xml.internal.ws.encoding.XmlDataContentHandler"; for (CommandInfo command : commands) { String commandClass = command.getCommandClass(); if (saajClassName.equals(commandClass) || jaxwsClassName.equals(commandClass)) { return true; } } return false; }
Example 3
Source File: BindingImpl.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
private static boolean cmdMapInitialized(MailcapCommandMap mailMap) { CommandInfo[] commands = mailMap.getAllCommands("text/xml"); if (commands == null || commands.length == 0) { return false; } // SAAJ RI implements it's own DataHandlers which can be used for JAX-WS too; // see com.sun.xml.internal.messaging.saaj.soap.AttachmentPartImpl#initializeJavaActivationHandlers // so if found any of SAAJ or our own handler registered, we are ok; anyway using SAAJ directly here // is not good idea since we don't want standalone JAX-WS to depend on specific SAAJ impl. // This is also reason for duplication of Handler's code by JAX-WS String saajClassName = "com.sun.xml.internal.messaging.saaj.soap.XmlDataContentHandler"; String jaxwsClassName = "com.sun.xml.internal.ws.encoding.XmlDataContentHandler"; for (CommandInfo command : commands) { String commandClass = command.getCommandClass(); if (saajClassName.equals(commandClass) || jaxwsClassName.equals(commandClass)) { return true; } } return false; }
Example 4
Source File: BindingImpl.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
private static boolean cmdMapInitialized(MailcapCommandMap mailMap) { CommandInfo[] commands = mailMap.getAllCommands("text/xml"); if (commands == null || commands.length == 0) { return false; } // SAAJ RI implements it's own DataHandlers which can be used for JAX-WS too; // see com.sun.xml.internal.messaging.saaj.soap.AttachmentPartImpl#initializeJavaActivationHandlers // so if found any of SAAJ or our own handler registered, we are ok; anyway using SAAJ directly here // is not good idea since we don't want standalone JAX-WS to depend on specific SAAJ impl. // This is also reason for duplication of Handler's code by JAX-WS String saajClassName = "com.sun.xml.internal.messaging.saaj.soap.XmlDataContentHandler"; String jaxwsClassName = "com.sun.xml.internal.ws.encoding.XmlDataContentHandler"; for (CommandInfo command : commands) { String commandClass = command.getCommandClass(); if (saajClassName.equals(commandClass) || jaxwsClassName.equals(commandClass)) { return true; } } return false; }
Example 5
Source File: BindingImpl.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
private static boolean cmdMapInitialized(MailcapCommandMap mailMap) { CommandInfo[] commands = mailMap.getAllCommands("text/xml"); if (commands == null || commands.length == 0) { return false; } // SAAJ RI implements it's own DataHandlers which can be used for JAX-WS too; // see com.sun.xml.internal.messaging.saaj.soap.AttachmentPartImpl#initializeJavaActivationHandlers // so if found any of SAAJ or our own handler registered, we are ok; anyway using SAAJ directly here // is not good idea since we don't want standalone JAX-WS to depend on specific SAAJ impl. // This is also reason for duplication of Handler's code by JAX-WS String saajClassName = "com.sun.xml.internal.messaging.saaj.soap.XmlDataContentHandler"; String jaxwsClassName = "com.sun.xml.internal.ws.encoding.XmlDataContentHandler"; for (CommandInfo command : commands) { String commandClass = command.getCommandClass(); if (saajClassName.equals(commandClass) || jaxwsClassName.equals(commandClass)) { return true; } } return false; }
Example 6
Source File: BindingImpl.java From hottub with GNU General Public License v2.0 | 6 votes |
private static boolean cmdMapInitialized(MailcapCommandMap mailMap) { CommandInfo[] commands = mailMap.getAllCommands("text/xml"); if (commands == null || commands.length == 0) { return false; } // SAAJ RI implements it's own DataHandlers which can be used for JAX-WS too; // see com.sun.xml.internal.messaging.saaj.soap.AttachmentPartImpl#initializeJavaActivationHandlers // so if found any of SAAJ or our own handler registered, we are ok; anyway using SAAJ directly here // is not good idea since we don't want standalone JAX-WS to depend on specific SAAJ impl. // This is also reason for duplication of Handler's code by JAX-WS String saajClassName = "com.sun.xml.internal.messaging.saaj.soap.XmlDataContentHandler"; String jaxwsClassName = "com.sun.xml.internal.ws.encoding.XmlDataContentHandler"; for (CommandInfo command : commands) { String commandClass = command.getCommandClass(); if (saajClassName.equals(commandClass) || jaxwsClassName.equals(commandClass)) { return true; } } return false; }