1 17 package org.apache.activemq.transport.reliable; 18 19 import org.apache.activemq.openwire.OpenWireFormat; 20 import org.apache.activemq.transport.udp.CommandChannel; 21 import org.apache.activemq.transport.udp.CommandDatagramChannel; 22 import org.apache.activemq.transport.udp.UdpTransport; 23 24 import java.io.IOException ; 25 import java.net.SocketAddress ; 26 import java.net.URI ; 27 import java.net.UnknownHostException ; 28 29 35 public class UnreliableUdpTransport extends UdpTransport { 36 37 private DropCommandStrategy dropCommandStrategy; 38 39 public UnreliableUdpTransport(OpenWireFormat wireFormat, int port) throws UnknownHostException , IOException { 40 super(wireFormat, port); 41 } 42 43 public UnreliableUdpTransport(OpenWireFormat wireFormat, SocketAddress socketAddress) throws IOException { 44 super(wireFormat, socketAddress); 45 } 46 47 public UnreliableUdpTransport(OpenWireFormat wireFormat, URI remoteLocation) throws UnknownHostException , 48 IOException { 49 super(wireFormat, remoteLocation); 50 } 51 52 public UnreliableUdpTransport(OpenWireFormat wireFormat) throws IOException { 53 super(wireFormat); 54 } 55 56 public DropCommandStrategy getDropCommandStrategy() { 57 return dropCommandStrategy; 58 } 59 60 public void setDropCommandStrategy(DropCommandStrategy dropCommandStrategy) { 61 this.dropCommandStrategy = dropCommandStrategy; 62 } 63 64 protected CommandChannel createCommandDatagramChannel() { 65 return new UnreliableCommandDatagramChannel(this, getWireFormat(), getDatagramSize(), getTargetAddress(), 66 createDatagramHeaderMarshaller(), getReplayBuffer(), getChannel(), getBufferPool(), dropCommandStrategy); 67 } 68 69 } 70 | Popular Tags |