1 46 47 package org.mr.core.net; 48 49 import java.io.IOException ; 50 import java.net.SocketAddress ; 51 import java.nio.channels.SocketChannel ; 52 53 62 public class MWBTransportImpl extends TCPTransportImpl { 63 private String password; 64 65 public MWBTransportImpl(SocketAddress local, SocketAddress remote, 66 String password) 67 throws IOException 68 { 69 super(local, remote); 70 this.password = password; 71 } 72 73 public MWBTransportImpl(SocketChannel channel) { 74 super(channel); 75 this.password = null; 77 } 78 79 protected void outgoingMessageHook(CNLMessage message) { 80 if (this.password != null) { 81 message.signMessage(this.password); 82 } 83 } 84 85 public TransportType getType() { 86 return TransportType.MWB; 87 }} | Popular Tags |