com.sun.istack.internal.NotNull Java Examples
The following examples show how to use
com.sun.istack.internal.NotNull.
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: RuntimeWSDLParser.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
private RuntimeWSDLParser(@NotNull String sourceLocation, XMLEntityResolver resolver, boolean isClientSide, Container container, PolicyResolver policyResolver, WSDLParserExtension... extensions) { this.wsdlDoc = sourceLocation!=null ? new WSDLModelImpl(sourceLocation) : new WSDLModelImpl(); this.resolver = resolver; this.policyResolver = policyResolver; this.extensions = new ArrayList<WSDLParserExtension>(); this.context = new WSDLParserExtensionContextImpl(wsdlDoc, isClientSide, container, policyResolver); boolean isPolicyExtensionFound = false; for (WSDLParserExtension e : extensions) { if (e instanceof com.sun.xml.internal.ws.api.wsdl.parser.PolicyWSDLParserExtension) isPolicyExtensionFound = true; register(e); } // register handlers for default extensions if (!isPolicyExtensionFound) register(new PolicyWSDLParserExtension()); register(new MemberSubmissionAddressingWSDLParserExtension()); register(new W3CAddressingWSDLParserExtension()); register(new W3CAddressingMetadataWSDLParserExtension()); this.extensionFacade = new WSDLParserExtensionFacade(this.extensions.toArray(new WSDLParserExtension[0])); }
Example #2
Source File: HttpAdapter.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
private Packet decodePacket(@NotNull WSHTTPConnection con, @NotNull Codec codec) throws IOException { String ct = con.getRequestHeader("Content-Type"); InputStream in = con.getInput(); Packet packet = new Packet(); packet.soapAction = fixQuotesAroundSoapAction(con.getRequestHeader("SOAPAction")); packet.wasTransportSecure = con.isSecure(); packet.acceptableMimeTypes = con.getRequestHeader("Accept"); packet.addSatellite(con); addSatellites(packet); packet.isAdapterDeliversNonAnonymousResponse = true; packet.component = this; packet.transportBackChannel = new Oneway(con); packet.webServiceContextDelegate = con.getWebServiceContextDelegate(); packet.setState(Packet.State.ServerRequest); if (dump || LOGGER.isLoggable(Level.FINER)) { ByteArrayBuffer buf = new ByteArrayBuffer(); buf.write(in); in.close(); dump(buf, "HTTP request", con.getRequestHeaders()); in = buf.newInputStream(); } codec.decode(in, ct, packet); return packet; }
Example #3
Source File: StAXSource.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Creates a new {@link javax.xml.transform.Source} for the given * {@link XMLStreamReader}. * * The XMLStreamReader must be pointing at either a * {@link javax.xml.stream.XMLStreamConstants#START_DOCUMENT} or * {@link javax.xml.stream.XMLStreamConstants#START_ELEMENT} event. * * @param reader XMLStreamReader that will be exposed as a Source * @param eagerQuit if true, when the conversion is completed, leave the cursor to the last * event that was fired (such as end element) * @param inscope inscope Namespaces * array of the even length of the form { prefix0, uri0, prefix1, uri1, ... } * @throws IllegalArgumentException iff the reader is null * @throws IllegalStateException iff the reader is not pointing at either a * START_DOCUMENT or START_ELEMENT event */ public StAXSource(XMLStreamReader reader, boolean eagerQuit, @NotNull String[] inscope) { if( reader == null ) throw new IllegalArgumentException(); this.staxReader = reader; int eventType = reader.getEventType(); if (!(eventType == XMLStreamConstants.START_DOCUMENT) && !(eventType == XMLStreamConstants.START_ELEMENT)) { throw new IllegalStateException(); } this.reader = new XMLStreamReaderToContentHandler(reader,repeater,eagerQuit,false,inscope); super.setXMLReader(pseudoParser); // pass a dummy InputSource. We don't care super.setInputSource(new InputSource()); }
Example #4
Source File: EndpointFactory.java From TencentKona-8 with GNU General Public License v2.0 | 6 votes |
/** * Finds the primary WSDL document from the list of metadata documents. If * there are two metadata documents that qualify for primary, it throws an * exception. If there are two metadata documents that qualify for porttype, * it throws an exception. * * @return primay wsdl document, null if is not there in the docList * */ private static @Nullable SDDocumentImpl findPrimary(@NotNull List<SDDocumentImpl> docList) { SDDocumentImpl primaryDoc = null; boolean foundConcrete = false; boolean foundAbstract = false; for(SDDocumentImpl doc : docList) { if (doc instanceof SDDocument.WSDL) { SDDocument.WSDL wsdlDoc = (SDDocument.WSDL)doc; if (wsdlDoc.hasService()) { primaryDoc = doc; if (foundConcrete) { throw new ServerRtException("duplicate.primary.wsdl", doc.getSystemId() ); } foundConcrete = true; } if (wsdlDoc.hasPortType()) { if (foundAbstract) { throw new ServerRtException("duplicate.abstract.wsdl", doc.getSystemId()); } foundAbstract = true; } } } return primaryDoc; }
Example #5
Source File: WSEndpointReference.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Reads this EPR as {@link XMLStreamReader}. * * @param localName * EPR uses a different root tag name depending on the context. * The returned {@link XMLStreamReader} will use the given local name * for the root element name. */ public XMLStreamReader read(final @NotNull String localName) throws XMLStreamException { return new StreamReaderBufferProcessor(infoset) { @Override protected void processElement(String prefix, String uri, String _localName, boolean inScope) { if (_depth == 0) { _localName = localName; } super.processElement(prefix, uri, _localName, isInscope(infoset,_depth)); } }; }
Example #6
Source File: InstanceResolver.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Creates a default {@link InstanceResolver} that serves the given class. */ public static <T> InstanceResolver<T> createDefault(@NotNull Class<T> clazz) { InstanceResolver<T> ir = createFromInstanceResolverAnnotation(clazz); if(ir==null) ir = new SingletonResolver<T>(createNewInstance(clazz)); return ir; }
Example #7
Source File: UsesJAXBContextFeature.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Creates {@link UsesJAXBContextFeature}. * This version allows you to create {@link JAXBRIContext} upfront and uses it. */ public UsesJAXBContextFeature(@Nullable final JAXBRIContext context) { this.factory = new JAXBContextFactory() { @NotNull public JAXBRIContext createJAXBContext(@NotNull SEIModel sei, @NotNull List<Class> classesToBind, @NotNull List<TypeReference> typeReferences) throws JAXBException { return context; } }; }
Example #8
Source File: TubelineAssemblerFactory.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@Override public @NotNull Tube createClient(@NotNull ClientTubeAssemblerContext context) { ClientPipeAssemblerContext ctxt = new ClientPipeAssemblerContext( context.getAddress(), context.getWsdlModel(), context.getService(), context.getBinding(), context.getContainer()); return PipeAdapter.adapt(assembler.createClient(ctxt)); }
Example #9
Source File: Internalizer.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
@NotNull static String fixNull(@Nullable String s) { if (s == null) { return ""; } else { return s; } }
Example #10
Source File: ByteArrayAttachment.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
public ByteArrayAttachment(@NotNull String contentId, byte[] data, int start, int len, String mimeType) { this.contentId = contentId; this.data = data; this.start = start; this.len = len; this.mimeType = mimeType; }
Example #11
Source File: WSEndpointReference.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Creates a {@link Dispatch} that can be used to talk to this EPR. * * <p> * All the normal WS-Addressing processing happens automatically, * such as setting the endpoint address to {@link #getAddress() the address}, * and sending the reference parameters associated with this EPR as * headers, etc. */ public @NotNull Dispatch<Object> createDispatch( @NotNull Service jaxwsService, @NotNull JAXBContext context, @NotNull Service.Mode mode, WebServiceFeature... features) { // TODO: implement it in a better way return jaxwsService.createDispatch(toSpec(),context,mode,features); }
Example #12
Source File: MetroConfigLoader.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
private static MetroConfig loadMetroConfig(@NotNull URL resourceUrl) { MetroConfig result = null; try { JAXBContext jaxbContext = createJAXBContext(); Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); XMLInputFactory factory = XmlUtil.newXMLInputFactory(true); final JAXBElement<MetroConfig> configElement = unmarshaller.unmarshal(factory.createXMLStreamReader(resourceUrl.openStream()), MetroConfig.class); result = configElement.getValue(); } catch (Exception e) { LOGGER.warning(TubelineassemblyMessages.MASM_0010_ERROR_READING_CFG_FILE_FROM_LOCATION(resourceUrl.toString()), e); } return result; }
Example #13
Source File: WSEndpointReference.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Creates an EPR from individual components. * * <p> * This version takes various information about metadata, and creates an EPR that has * the necessary embedded WSDL. */ public WSEndpointReference(@NotNull AddressingVersion version, @NotNull String address, @Nullable QName service, @Nullable QName port, @Nullable QName portType, @Nullable List<Element> metadata, @Nullable String wsdlAddress, @Nullable List<Element> referenceParameters) { this(version, address, service, port, portType, metadata, wsdlAddress, null, referenceParameters, null, null); }
Example #14
Source File: ServerTubeAssemblerContext.java From TencentKona-8 with GNU General Public License v2.0 | 5 votes |
/** * Creates a {@link Tube} that does the monitoring of the invocation for a * container */ public @NotNull Tube createMonitoringTube(@NotNull Tube next) { ServerPipelineHook hook = endpoint.getContainer().getSPI(ServerPipelineHook.class); if (hook != null) { ServerPipeAssemblerContext ctxt = new ServerPipeAssemblerContext(seiModel, wsdlModel, endpoint, terminal, isSynchronous); return PipeAdapter.adapt(hook.createMonitoringPipe(ctxt, PipeAdapter.adapt(next))); } return next; }
Example #15
Source File: FilterMessageImpl.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public @NotNull String getID(AddressingVersion av, SOAPVersion sv) { return delegate.getID(av, sv); }
Example #16
Source File: XMLMessage.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
protected static boolean isXMLType(@NotNull String primary, @NotNull String sub) { return (primary.equalsIgnoreCase("text") && sub.equalsIgnoreCase("xml")) || (primary.equalsIgnoreCase("application") && sub.equalsIgnoreCase("xml")) || (primary.equalsIgnoreCase("application") && sub.toLowerCase().endsWith("+xml")); }
Example #17
Source File: OldBridge.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
/** * @since 2.0.3 */ public final @NotNull T unmarshal(@NotNull XMLStreamReader in, @Nullable AttachmentUnmarshaller au) throws JAXBException { Unmarshaller u = context.unmarshallerPool.take(); u.setAttachmentUnmarshaller(au); return exit(unmarshal(u,in),u); }
Example #18
Source File: PipeAdapter.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
@NotNull public NextAction processException(@NotNull Throwable t) { throw new IllegalStateException(); }
Example #19
Source File: AbstractWebServiceContext.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public AbstractWebServiceContext(@NotNull WSEndpoint endpoint) { this.endpoint = endpoint; }
Example #20
Source File: Bridge.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public final @NotNull T unmarshal(@NotNull BridgeContext context, @NotNull InputStream in) throws JAXBException { return unmarshal( ((BridgeContextImpl)context).unmarshaller, in ); }
Example #21
Source File: ServiceFinder.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public static <T> ServiceFinder<T> find(@NotNull Class<T> service, @Nullable ClassLoader loader, Component component) { return new ServiceFinder<T>(service, loader, component); }
Example #22
Source File: DefaultServerTubelineAssemblyContext.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public DefaultServerTubelineAssemblyContext(@NotNull ServerTubeAssemblerContext context) { this.wrappedContext = context; this.policyMap = context.getEndpoint().getPolicyMap(); }
Example #23
Source File: OldBridge.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public final @NotNull T unmarshal(@NotNull BridgeContext context, @NotNull Node n) throws JAXBException { return unmarshal( ((BridgeContextImpl)context).unmarshaller, n ); }
Example #24
Source File: WSService.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public @NotNull Set<Component> getComponents() { return components; }
Example #25
Source File: SyncProviderInvokerTube.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public @NotNull NextAction processResponse(@NotNull Packet response) { return doReturnWith(response); }
Example #26
Source File: WSEndpointImpl.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public @NotNull Codec createCodec() { return masterCodec.copy(); }
Example #27
Source File: EditableWSDLOutput.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
@Override @NotNull EditableWSDLOperation getOperation();
Example #28
Source File: BindingImpl.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
public @Nullable <F extends WebServiceFeature> F getOperationFeature(@NotNull Class<F> featureType, @NotNull final QName operationName) { final WebServiceFeatureList operationFeatureList = this.operationFeatures.get(operationName); return FeatureListUtil.mergeFeature(featureType, operationFeatureList, features); }
Example #29
Source File: ProblemActionHeader.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
@Nullable public String getAttribute(@NotNull String nsUri, @NotNull String localName) { return null; }
Example #30
Source File: HttpAdapter.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
/** * Receives the incoming HTTP connection and dispatches * it to JAX-WS. This method returns when JAX-WS completes * processing the request and the whole reply is written * to {@link WSHTTPConnection}. * * <p> * This method is invoked by the lower-level HTTP stack, * and "connection" here is an HTTP connection. * * <p> * To populate a request {@link com.sun.xml.internal.ws.api.message.Packet} with more info, * define {@link com.oracle.webservices.internal.api.message.PropertySet.Property properties} on * {@link WSHTTPConnection}. * * @param connection to receive/send HTTP messages for web service endpoints * @throws java.io.IOException when I/O errors happen */ public void handle(@NotNull WSHTTPConnection connection) throws IOException { if (handleGet(connection)) { return; } // Make sure the Toolkit is recycled by the same pool instance from which it was taken final Pool<HttpToolkit> currentPool = getPool(); // normal request handling final HttpToolkit tk = currentPool.take(); try { tk.handle(connection); } finally { currentPool.recycle(tk); } }