1 23 24 29 30 package com.sun.enterprise.webservice.monitoring; 31 32 import java.util.List ; 33 import java.util.ArrayList ; 34 35 import com.sun.enterprise.deployment.WebServiceEndpoint; 36 37 42 public class EndpointImpl implements Endpoint { 43 44 public final static String NAME = "MONITORING_ENDPOINT"; 45 public final static String MESSAGE_ID = "MONITORING_MESSAGE_ID"; 46 public final static String REQUEST_TRACE = "MONITORING_REQUEST_MESSAGE_TRACE"; 47 48 final String endpointSelector; 49 final EndpointType type; 50 WebServiceEndpoint endpointDesc; 51 List <MessageListener> listeners = new ArrayList <MessageListener>(); 52 53 54 EndpointImpl(String endpointSelector, EndpointType type) { 55 this.endpointSelector = endpointSelector; 56 this.type = type; 57 } 58 59 63 public String getEndpointSelector() { 64 return endpointSelector; 65 } 66 67 70 public EndpointType getEndpointType() { 71 return type; 72 } 73 74 77 public TransportType getTransport() { 78 return TransportType.HTTP; 79 } 80 81 85 public void addListener(MessageListener newListener) { 86 listeners.add(newListener); 87 } 88 89 93 public void removeListener(MessageListener listener) { 94 listeners.remove(listener); 95 } 96 97 101 public boolean hasListeners() { 102 return !listeners.isEmpty(); 103 } 104 105 109 public WebServiceEndpoint getDescriptor() { 110 return endpointDesc; 111 } 112 113 116 public void setDescriptor(WebServiceEndpoint endpointDesc) { 117 118 if (endpointDesc!=null) { 119 endpointDesc.addExtraAttribute(EndpointImpl.NAME, this); 120 } 121 this.endpointDesc = endpointDesc; 122 } 123 } 124 | Popular Tags |