/** * Sends a SNMP message to the supplied address. * @param address * an <code>TcpAddress</code>. A <code>ClassCastException</code> is thrown * if <code>address</code> is not a <code>TcpAddress</code> instance. * @param message byte[] * the message to sent. * @throws IOException */ public void sendMessage(Address address, byte[] message) throws java.io.IOException { if (server == null) { listen(); } serverThread.sendMessage(address, message); }
/** * Sends a SNMP message to the supplied address. * @param address * an {@code TcpAddress}. A {@code ClassCastException} is thrown * if {@code address} is not a {@code TcpAddress} instance. * @param message byte[] * the message to sent. * @param tmStateReference * the (optional) transport model state reference as defined by * RFC 5590 section 6.1. * @throws IOException * if an IO exception occurs while trying to send the message. */ public void sendMessage(TcpAddress address, byte[] message, TransportStateReference tmStateReference) throws java.io.IOException { if (server == null) { listen(); } serverThread.sendMessage(address, message, tmStateReference); }
/** * Sends a SNMP message to the supplied address. * * @param address * an {@code TcpAddress}. A {@code ClassCastException} is thrown * if {@code address} is not a {@code TcpAddress} instance. * @param message * byte[] * the message to sent. * @param tmStateReference * the (optional) transport model state reference as defined by * RFC 5590 section 6.1. * * @throws IOException * if an IO exception occurs while trying to send the message. */ public void sendMessage(TcpAddress address, byte[] message, TransportStateReference tmStateReference, long timeoutMillis, int maxRetries) throws java.io.IOException { if (server == null) { listen(); } serverThread.sendMessage(address, message, tmStateReference); }