001: /*
002: * Portions Copyright 2006 Sun Microsystems, Inc. All Rights Reserved.
003: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004: *
005: * This code is free software; you can redistribute it and/or modify it
006: * under the terms of the GNU General Public License version 2 only, as
007: * published by the Free Software Foundation. Sun designates this
008: * particular file as subject to the "Classpath" exception as provided
009: * by Sun in the LICENSE file that accompanied this code.
010: *
011: * This code is distributed in the hope that it will be useful, but WITHOUT
012: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
014: * version 2 for more details (a copy is included in the LICENSE file that
015: * accompanied this code).
016: *
017: * You should have received a copy of the GNU General Public License version
018: * 2 along with this work; if not, write to the Free Software Foundation,
019: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020: *
021: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022: * CA 95054 USA or visit www.sun.com if you need additional information or
023: * have any questions.
024: */
025: package com.sun.xml.internal.ws.client;
026:
027: import com.sun.xml.internal.ws.server.RuntimeContext;
028:
029: import javax.xml.namespace.QName;
030: import javax.xml.ws.handler.Handler;
031:
032: import java.util.ArrayList;
033: import java.util.List;
034:
035: /**
036: * $author: WS Development Team
037: */
038: public class EndpointIFContext {
039:
040: private RuntimeContext runtimeContext; //from annotationPro ess
041: private Class serviceInterface; //prop can take out
042: private QName serviceName;
043: private Class sei;
044: private QName portName;
045: private ArrayList<Handler> handlers;
046: private String endpointAddress;
047: private String bindingId;
048:
049: public EndpointIFContext(Class sei) {
050: this .sei = sei;
051: handlers = new ArrayList();
052: }
053:
054: public RuntimeContext getRuntimeContext() {
055: return runtimeContext;
056: }
057:
058: public void setRuntimeContext(RuntimeContext runtimeContext) {
059: this .runtimeContext = runtimeContext;
060: }
061:
062: public Class getServiceInterface() {
063: return serviceInterface;
064: }
065:
066: public void setServiceInterface(Class serviceInterface) {
067: this .serviceInterface = serviceInterface;
068: }
069:
070: public Class getSei() {
071: return sei;
072: }
073:
074: public void setSei(Class sei) {
075: this .sei = sei;
076: }
077:
078: public QName getPortName() {
079: if (portName == null) {
080: if ((runtimeContext != null)
081: && (runtimeContext.getModel() != null))
082: portName = runtimeContext.getModel().getPortName();
083: }
084: return portName;
085: }
086:
087: public String getEndpointAddress() {
088: return endpointAddress;
089: }
090:
091: public void setPortInfo(QName portQName, String endpoint,
092: String bindingID) {
093: portName = portQName;
094: endpointAddress = endpoint;
095: this .bindingId = bindingID;
096: }
097:
098: public String getBindingID() {
099: return bindingId;
100: }
101:
102: public QName getServiceName() {
103: return serviceName;
104: }
105:
106: public boolean contains(QName serviceName) {
107: if (serviceName.equals(this .serviceName))
108: return true;
109: return false;
110: }
111:
112: public void setServiceName(QName serviceName) {
113: this .serviceName = serviceName;
114: }
115:
116: public void setPortName(QName portName) {
117: this .portName = portName;
118: }
119:
120: public void setBindingID(String bindingId) {
121: this.bindingId = bindingId;
122: }
123: }
|