1 /*
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
304 /**
305 * Creates a new JAXB-based {@link Dispatch} stub that connects to the given pipe.
306 *
307 * @param portInfo see <a href="#param">common parameters</a>
308 * @param binding see <a href="#param">common parameters</a>
309 * @param jaxbContext {@link JAXBContext} used to convert between objects and XML.
310 * @param mode The mode of the dispatch.
311 * See {@link Service#createDispatch(QName, Class, Service.Mode)}.
312 * @param epr see <a href="#param">common parameters</a>
313 */
314 public static Dispatch<Object> createJAXBDispatch(
315 WSPortInfo portInfo, WSBinding binding,
316 JAXBContext jaxbContext, Service.Mode mode,
317 @Nullable WSEndpointReference epr) {
318 return new JAXBDispatch(portInfo, jaxbContext, mode, (BindingImpl) binding, epr);
319 }
320
321
322 /**
323 * Creates a new {@link Message}-based {@link Dispatch} stub that connects to the given pipe.
324 * The returned dispatch is always {@link Service.Mode#MESSAGE}.
325 *
326 * @param portName
327 * see {@link Service#createDispatch(QName, Class, Service.Mode)}.
328 * @param owner
329 * see <a href="#param">common parameters</a>
330 * @param binding
331 * see <a href="#param">common parameters</a>
332 * @param next
333 * see <a href="#param">common parameters</a>
334 * @param epr
335 * see <a href="#param">common parameters</a>
336 */
337 @Deprecated
338 public static Dispatch<Message> createMessageDispatch(
339 QName portName, WSService owner, WSBinding binding,
340 Tube next, @Nullable WSEndpointReference epr) {
341 return new MessageDispatch(portName, (WSServiceDelegate)owner, next, (BindingImpl)binding, epr);
342 }
343
344
345 /**
346 * Creates a new {@link Message}-based {@link Dispatch} stub that connects to the given pipe.
347 * The returned dispatch is always {@link Service.Mode#MESSAGE}.
348 *
349 * @param portInfo
350 * see <a href="#param">common parameters</a>
351 * @param binding
352 * see <a href="#param">common parameters</a>
353 * @param epr
354 * see <a href="#param">common parameters</a>
355 */
356 public static Dispatch<Message> createMessageDispatch(
357 WSPortInfo portInfo, WSBinding binding,
358 @Nullable WSEndpointReference epr) {
359 return new MessageDispatch(portInfo, (BindingImpl)binding, epr);
360 }
361
362 /**
363 * Creates a new {@link Packet}-based {@link Dispatch} stub that connects to the given pipe.
364 *
365 * @param portName
366 * see {@link Service#createDispatch(QName, Class, Service.Mode)}.
367 * @param owner
368 * see <a href="#param">common parameters</a>
369 * @param binding
370 * see <a href="#param">common parameters</a>
371 * @param next
372 * see <a href="#param">common parameters</a>
373 * @param epr
374 * see <a href="#param">common parameters</a>
375 */
376 public static Dispatch<Packet> createPacketDispatch(
377 QName portName, WSService owner, WSBinding binding,
378 Tube next, @Nullable WSEndpointReference epr) {
379 return new PacketDispatch(portName, (WSServiceDelegate)owner, next, (BindingImpl)binding, epr);
380 }
381
382 /**
383 * Creates a new {@link Message}-based {@link Dispatch} stub that connects to the given pipe.
384 * The returned dispatch is always {@link Service.Mode#MESSAGE}.
385 *
386 * @param portInfo
387 * see <a href="#param">common parameters</a>
388 * @param binding
389 * see <a href="#param">common parameters</a>
390 * @param epr
391 * see <a href="#param">common parameters</a>
392 */
393 public static Dispatch<Packet> createPacketDispatch(
394 WSPortInfo portInfo, WSBinding binding,
395 @Nullable WSEndpointReference epr) {
396 return new PacketDispatch(portInfo, (BindingImpl)binding, epr);
397 }
398
399 /**
400 * Creates a new strongly-typed proxy object that implements a given port interface.
401 *
402 * @param service
403 * see <a href="#param">common parameters</a>
404 * @param binding
|
1 /*
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
304 /**
305 * Creates a new JAXB-based {@link Dispatch} stub that connects to the given pipe.
306 *
307 * @param portInfo see <a href="#param">common parameters</a>
308 * @param binding see <a href="#param">common parameters</a>
309 * @param jaxbContext {@link JAXBContext} used to convert between objects and XML.
310 * @param mode The mode of the dispatch.
311 * See {@link Service#createDispatch(QName, Class, Service.Mode)}.
312 * @param epr see <a href="#param">common parameters</a>
313 */
314 public static Dispatch<Object> createJAXBDispatch(
315 WSPortInfo portInfo, WSBinding binding,
316 JAXBContext jaxbContext, Service.Mode mode,
317 @Nullable WSEndpointReference epr) {
318 return new JAXBDispatch(portInfo, jaxbContext, mode, (BindingImpl) binding, epr);
319 }
320
321
322 /**
323 * Creates a new {@link Message}-based {@link Dispatch} stub that connects to the given pipe.
324 * The returned dispatch is always {@link Mode#MESSAGE}.
325 *
326 * @param portName
327 * see {@link Service#createDispatch(QName, Class, Service.Mode)}.
328 * @param owner
329 * see <a href="#param">common parameters</a>
330 * @param binding
331 * see <a href="#param">common parameters</a>
332 * @param next
333 * see <a href="#param">common parameters</a>
334 * @param epr
335 * see <a href="#param">common parameters</a>
336 */
337 @Deprecated
338 public static Dispatch<Message> createMessageDispatch(
339 QName portName, WSService owner, WSBinding binding,
340 Tube next, @Nullable WSEndpointReference epr) {
341 return new MessageDispatch(portName, (WSServiceDelegate)owner, next, (BindingImpl)binding, epr);
342 }
343
344
345 /**
346 * Creates a new {@link Message}-based {@link Dispatch} stub that connects to the given pipe.
347 * The returned dispatch is always {@link Mode#MESSAGE}.
348 *
349 * @param portInfo
350 * see <a href="#param">common parameters</a>
351 * @param binding
352 * see <a href="#param">common parameters</a>
353 * @param epr
354 * see <a href="#param">common parameters</a>
355 */
356 public static Dispatch<Message> createMessageDispatch(
357 WSPortInfo portInfo, WSBinding binding,
358 @Nullable WSEndpointReference epr) {
359 return new MessageDispatch(portInfo, (BindingImpl)binding, epr);
360 }
361
362 /**
363 * Creates a new {@link Packet}-based {@link Dispatch} stub that connects to the given pipe.
364 *
365 * @param portName
366 * see {@link Service#createDispatch(QName, Class, Service.Mode)}.
367 * @param owner
368 * see <a href="#param">common parameters</a>
369 * @param binding
370 * see <a href="#param">common parameters</a>
371 * @param next
372 * see <a href="#param">common parameters</a>
373 * @param epr
374 * see <a href="#param">common parameters</a>
375 */
376 public static Dispatch<Packet> createPacketDispatch(
377 QName portName, WSService owner, WSBinding binding,
378 Tube next, @Nullable WSEndpointReference epr) {
379 return new PacketDispatch(portName, (WSServiceDelegate)owner, next, (BindingImpl)binding, epr);
380 }
381
382 /**
383 * Creates a new {@link Message}-based {@link Dispatch} stub that connects to the given pipe.
384 * The returned dispatch is always {@link Mode#MESSAGE}.
385 *
386 * @param portInfo
387 * see <a href="#param">common parameters</a>
388 * @param binding
389 * see <a href="#param">common parameters</a>
390 * @param epr
391 * see <a href="#param">common parameters</a>
392 */
393 public static Dispatch<Packet> createPacketDispatch(
394 WSPortInfo portInfo, WSBinding binding,
395 @Nullable WSEndpointReference epr) {
396 return new PacketDispatch(portInfo, (BindingImpl)binding, epr);
397 }
398
399 /**
400 * Creates a new strongly-typed proxy object that implements a given port interface.
401 *
402 * @param service
403 * see <a href="#param">common parameters</a>
404 * @param binding
|