1 20 21 22 23 24 25 package org.snmp4j.transport; 26 27 import org.snmp4j.smi.Address; 28 import java.io.IOException ; 29 import org.snmp4j.smi.UdpAddress; 30 31 37 38 public abstract class UdpTransportMapping extends AbstractTransportMapping { 39 40 protected UdpAddress udpAddress; 41 42 43 public UdpTransportMapping(UdpAddress udpAddress) { 44 this.udpAddress = udpAddress; 45 } 46 47 public Class getSupportedAddressClass() { 48 return UdpAddress.class; 49 } 50 51 58 public UdpAddress getAddress() { 59 return udpAddress; 60 } 61 62 public Address getListenAddress() { 63 return udpAddress; 64 } 65 66 public abstract void listen() throws IOException ; 67 68 public abstract void close() throws IOException ; 69 70 public abstract void sendMessage(Address address, byte[] message) 71 throws IOException ; 72 73 } 74 | Popular Tags |