1 18 package org.apache.activemq.transport; 19 20 import org.apache.activemq.util.ServiceSupport; 21 22 import java.net.URI ; 23 24 29 public abstract class TransportServerSupport extends ServiceSupport implements TransportServer { 30 31 private URI connectURI; 32 private URI bindLocation; 33 private TransportAcceptListener acceptListener; 34 35 public TransportServerSupport() { 36 } 37 38 public TransportServerSupport(URI location) { 39 this.connectURI = location; 40 this.bindLocation = location; 41 } 42 43 46 public TransportAcceptListener getAcceptListener() { 47 return acceptListener; 48 } 49 50 55 public void setAcceptListener(TransportAcceptListener acceptListener) { 56 this.acceptListener = acceptListener; 57 } 58 59 62 public URI getConnectURI() { 63 return connectURI; 64 } 65 66 70 public void setConnectURI(URI location) { 71 this.connectURI = location; 72 } 73 74 protected void onAcceptError(Exception e) { 75 if (acceptListener != null) { 76 acceptListener.onAcceptError(e); 77 } 78 } 79 80 public URI getBindLocation() { 81 return bindLocation; 82 } 83 84 public void setBindLocation(URI bindLocation) { 85 this.bindLocation = bindLocation; 86 } 87 } 88 | Popular Tags |