1 18 package org.apache.activemq.transport.udp; 19 20 import org.apache.activemq.command.Command; 21 import org.apache.activemq.command.Endpoint; 22 import org.apache.activemq.transport.Transport; 23 import org.apache.activemq.transport.TransportFilter; 24 25 29 public class ResponseRedirectInterceptor extends TransportFilter { 30 private final UdpTransport transport; 31 32 public ResponseRedirectInterceptor(Transport next, UdpTransport transport) { 33 super(next); 34 this.transport = transport; 35 } 36 37 public void onCommand(Object o) { 38 final Command command = (Command) o; 39 Endpoint from = command.getFrom(); 41 transport.setTargetEndpoint(from); 42 43 super.onCommand(command); 44 } 45 } 46 | Popular Tags |