1 18 package org.apache.activemq.transport.xmpp; 19 20 import org.apache.activemq.transport.Transport; 21 import org.apache.activemq.transport.tcp.TcpTransport; 22 import org.apache.activemq.transport.tcp.TcpTransportFactory; 23 import org.apache.activemq.transport.tcp.TcpTransportServer; 24 import org.apache.activemq.wireformat.WireFormat; 25 26 import javax.net.SocketFactory; 27 import javax.net.ServerSocketFactory; 28 import java.io.IOException ; 29 import java.net.URI ; 30 import java.net.URISyntaxException ; 31 import java.util.Map ; 32 33 36 public class XmppTransportFactory extends TcpTransportFactory { 37 38 protected String getDefaultWireFormatType() { 39 return "xmpp"; 40 } 41 42 @Override 43 public Transport compositeConfigure(Transport transport, WireFormat format, Map options) { 44 return super.compositeConfigure(transport, format, options); 46 } 47 48 @Override 49 protected TcpTransport createTcpTransport(WireFormat wf, SocketFactory socketFactory, URI location, URI localLocation) throws IOException { 50 return new XmppTransport(wf, socketFactory, location, localLocation); 51 } 52 53 @Override 54 protected TcpTransportServer createTcpTransportServer(final URI location, ServerSocketFactory serverSocketFactory) throws IOException , URISyntaxException { 55 return new XmppTransportServer(this, location, serverSocketFactory); 56 } 57 } 58 | Popular Tags |