1 20 package org.apache.mina.transport.vmpipe; 21 22 import java.net.SocketAddress ; 23 24 import org.apache.mina.common.ConnectFuture; 25 import org.apache.mina.common.IoConnector; 26 import org.apache.mina.common.IoHandler; 27 import org.apache.mina.transport.AbstractTrafficControlTest; 28 29 36 public class VmPipeTrafficControlTest extends AbstractTrafficControlTest { 37 38 public VmPipeTrafficControlTest() { 39 super(new VmPipeAcceptor()); 40 } 41 42 protected ConnectFuture connect(int port, IoHandler handler) 43 throws Exception { 44 IoConnector connector = new VmPipeConnector(); 45 SocketAddress addr = new VmPipeAddress(port); 46 return connector.connect(addr, handler); 47 } 48 49 protected SocketAddress createServerSocketAddress(int port) { 50 return new VmPipeAddress(port); 51 } 52 53 } 54 | Popular Tags |