Codota Logo
TcpAddress.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.snmp4j.smi.TcpAddress
constructor

Best Java code snippets using org.snmp4j.smi.TcpAddress.<init> (Showing top 20 results out of 315)

  • Common ways to obtain TcpAddress
private void myMethod () {
TcpAddress t =
  • Codota Iconnew TcpAddress()
  • Codota IconSocketChannel socketChannel;SocketChannel socketChannel2;new TcpAddress(socketChannel.socket().getInetAddress(), socketChannel2.socket().getPort())
  • Codota Iconnew TcpAddress(InetAddress.getLocalHost(), int1)
  • Smart code suggestions by Codota
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.snmp4j

/**
 * Creates a default TCP transport mapping with the server for incoming
 * messages disabled.
 * @throws IOException
 *    on failure of binding a local port.
 */
public DefaultTcpTransportMapping() throws IOException {
 super(new TcpAddress(InetAddress.getLocalHost(), 0));
}
origin: org.snmp4j/snmp4j

/**
 * Creates a default TCP transport mapping with the server for incoming
 * messages disabled.
 *
 * @throws IOException
 *         on failure of binding a local port.
 */
public DefaultTcpTransportMapping() throws IOException {
  super(new TcpAddress(InetAddress.getLocalHost(), 0));
}
origin: org.kaazing/snmp4j

/**
 * Creates a default TCP transport mapping with the server for incoming
 * messages disabled.
 * @throws UnknownHostException
 * @throws IOException
 *    on failure of binding a local port.
 */
public DefaultTcpTransportMapping() throws UnknownHostException, IOException {
 super(new TcpAddress(InetAddress.getLocalHost(), 0));
}
origin: net.itransformers.snmp2xml4j/snmptoolkit

/**
 * <p>Constructor for SnmpTcpV1Manager.</p>
 *
 * @param loader a {@link net.percederberg.mibble.MibLoader} object.
 * @param ipAddress a {@link java.lang.String} object.
 * @param snmpCommunity a {@link java.lang.String} object.
 * @param retries a int.
 * @param timeout a int.
 * @param maxSizeRequestPDU a int.
 * @param maxRepetitions a int.
 * @param destinationPort a int.
 * @throws java.io.IOException if any.
 */
public SnmpTcpV1Manager(MibLoader loader, String ipAddress, String snmpCommunity, int retries, int timeout, int maxSizeRequestPDU, int maxRepetitions,int destinationPort) throws IOException {
  super(loader, retries, timeout, maxSizeRequestPDU,maxRepetitions,new TcpTransportMappingFactory(),new TcpAddress("0.0.0.0/0"));
  this.snmpCommunity = snmpCommunity;
  this.tcpAddress =  new TcpAddress(ipAddress+"/"+destinationPort);
}
/**
origin: net.itransformers.snmp2xml4j/snmptoolkit

/**
 * <p>Constructor for SnmpTcpV2Manager.</p>
 *
 * @param loader a {@link net.percederberg.mibble.MibLoader} object.
 * @param ipAddress a {@link java.lang.String} object.
 * @param snmpCommunity a {@link java.lang.String} object.
 * @param retries a int.
 * @param timeout a int.
 * @param maxSizeRequestPDU a int.
 * @param maxRepetitions a int.
 * @param destinationPort a int.
 * @throws java.io.IOException if any.
 */
public SnmpTcpV2Manager(MibLoader loader, String ipAddress, String snmpCommunity,int retries, int timeout,  int maxSizeRequestPDU,int maxRepetitions, int destinationPort) throws IOException {
  super(loader, retries, timeout, maxSizeRequestPDU,maxRepetitions, new TcpTransportMappingFactory(),new TcpAddress("0.0.0.0/0"));
  this.snmpCommunity = snmpCommunity;
  this.tcpAddress =  new TcpAddress(ipAddress+"/"+destinationPort);
}
/**
origin: net.itransformers.snmp2xml4j/snmptoolkit

/** {@inheritDoc} */
@Override
public void doSetParameters(Map<String, String> conParams) {
  int destinationPort = super.convertStringToIntParam("destinationPort",conParams.get("destinationPort"),161);
  this.tcpAddress = new TcpAddress(conParams.get("ipAddress")+"/"+destinationPort);
  this.snmpCommunity=conParams.get("snmpCommunity");
}
origin: net.itransformers.snmp2xml4j/snmptoolkit

/** {@inheritDoc} */
@Override
protected void doSetParameters(Map<String, String> conParams) {
    int destinationPort = super.convertStringToIntParam("destinationPort",conParams.get("destinationPort"),161);
    this.tcpAddress = new TcpAddress(conParams.get("ipAddress")+"/"+destinationPort);
    this.snmpCommunity=conParams.get("snmpCommunity");
}
origin: net.itransformers.snmp2xml4j/snmptoolkit

/** {@inheritDoc} */
@Override
public void doSetParameters(Map<String, String> conParams) {
  int destinationPort = super.convertStringToIntParam("destinationPort",conParams.get("destinationPort"),161);
  this.tcpAddress = new TcpAddress(conParams.get("ipAddress")+"/"+destinationPort);
  this.ver3Username = conParams.get("ver3Username");
  this.ver3AuthPasscode = conParams.get("ver3Username");
  this.authenticationProtocol = conParams.get("authenticationProtocol");
  this.privacyProtocol = conParams.get("privacyProtocol");
  this.privacyProtocolPassShare = conParams.get("privacyProtocolPassShare");
}
origin: org.snmp4j/snmp4j

private static Address getAddress(String transportAddress) {
  String transport = "udp";
  int colon = transportAddress.indexOf(':');
  if (colon > 0) {
    transport = transportAddress.substring(0, colon);
    transportAddress = transportAddress.substring(colon + 1);
  }
  // set default port
  if (transportAddress.indexOf('/') < 0) {
    transportAddress += "/161";
  }
  if (transport.equalsIgnoreCase("udp")) {
    return new UdpAddress(transportAddress);
  } else if (transport.equalsIgnoreCase("tcp")) {
    return new TcpAddress(transportAddress);
  }
  throw new IllegalArgumentException("Unknown transport " + transport);
}
origin: org.kaazing/snmp4j

private static Address getAddress(String transportAddress) {
 String transport = "udp";
 int colon = transportAddress.indexOf(':');
 if (colon > 0) {
  transport = transportAddress.substring(0, colon);
  transportAddress = transportAddress.substring(colon+1);
 }
 // set default port
 if (transportAddress.indexOf('/') < 0) {
  transportAddress += "/161";
 }
 if (transport.equalsIgnoreCase("udp")) {
  return new UdpAddress(transportAddress);
 }
 else if (transport.equalsIgnoreCase("tcp")) {
  return new TcpAddress(transportAddress);
 }
 throw new IllegalArgumentException("Unknown transport "+transport);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.snmp4j

@Override
public TcpAddress getListenAddress() {
 int port = tcpAddress.getPort();
 ServerThread serverThreadCopy = serverThread;
 try {
  port = serverThreadCopy.ssc.socket().getLocalPort();
 }
 catch (NullPointerException npe) {
  // ignore
 }
 return new TcpAddress(tcpAddress.getInetAddress(), port);
}
origin: net.itransformers.snmp2xml4j/snmptoolkit

/**
 * <p>Constructor for SnmpTcpV2Manager.</p>
 *
 * @param loader a {@link net.percederberg.mibble.MibLoader} object.
 */
public SnmpTcpV2Manager(MibLoader loader) {
  super(loader,new TcpTransportMappingFactory(),new DefaultMessageDispatcherFactory(),new TcpAddress("0.0.0.0/0"));
}
origin: org.snmp4j/snmp4j

public static Address parse(String address) {
 try {
  TcpAddress a = new TcpAddress();
  if (a.parseAddress(address)) {
   return a;
  }
 }
 catch (Exception ex) {
  logger.error(ex);
 }
 return null;
}
origin: org.kaazing/snmp4j

public static Address parse(String address) {
 try {
  TcpAddress a = new TcpAddress();
  if (a.parseAddress(address)) {
   return a;
  }
 }
 catch (Exception ex) {
  logger.error(ex);
 }
 return null;
}
origin: net.itransformers.snmp2xml4j/snmptoolkit

/**
 * <p>Constructor for SnmpTcpV1Manager.</p>
 *
 * @param loader a {@link net.percederberg.mibble.MibLoader} object.
 */
public SnmpTcpV1Manager(MibLoader loader) {
  super(loader,new TcpTransportMappingFactory(),new DefaultMessageDispatcherFactory(),new TcpAddress("0.0.0.0/0"));
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.snmp4j

public static Address parse(String address) {
 try {
  TcpAddress a = new TcpAddress();
  if (a.parseAddress(address)) {
   return a;
  }
 }
 catch (Exception ex) {
  logger.error(ex);
 }
 return null;
}
origin: net.itransformers.snmp2xml4j/snmptoolkit

/**
 * <p>Constructor for SnmpTcpV3Manager.</p>
 *
 * @param loader a {@link net.percederberg.mibble.MibLoader} object.
 */
public SnmpTcpV3Manager(MibLoader loader) {
  super(loader,new TcpTransportMappingFactory(),new DefaultMessageDispatcherFactory(),new TcpAddress("0.0.0.0/0"));
}
origin: org.snmp4j/snmp4j

@Override
public TcpAddress getListenAddress() {
  int port = tcpAddress.getPort();
  ServerThread serverThreadCopy = serverThread;
  try {
    port = ((InetSocketAddress) serverThreadCopy.ssc.getLocalAddress()).getPort();
  } catch (NullPointerException npe) {
    // ignore
  } catch (IOException e) {
    e.printStackTrace();
  }
  return new TcpAddress(tcpAddress.getInetAddress(), port);
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.snmp4j

@Override
public TcpAddress getListenAddress() {
 int port = tcpAddress.getPort();
 ServerThread serverThreadCopy = serverThread;
 try {
  port = ((InetSocketAddress)serverThreadCopy.ssc.getLocalAddress()).getPort();
 }
 catch (NullPointerException npe) {
  // ignore
 } catch (IOException e) {
  e.printStackTrace();
 }
 return new TcpAddress(tcpAddress.getInetAddress(), port);
}
origin: org.snmp4j/snmp4j

@Override
public TcpAddress getListenAddress() {
  int port = tcpAddress.getPort();
  ServerThread serverThreadCopy = serverThread;
  try {
    port = serverThreadCopy.ssc.socket().getLocalPort();
  } catch (NullPointerException npe) {
    if (logger.isDebugEnabled()) {
      logger.debug("TLSTM.getListenAddress called but TLSTM is not listening yet");
    }
  }
  return new TcpAddress(tcpAddress.getInetAddress(), port);
}
org.snmp4j.smiTcpAddress<init>

Popular methods of TcpAddress

  • getInetAddress
  • getPort
  • parseAddress
  • setInetAddress
  • setPort
  • equals
  • hashCode

Popular in Java

  • Start an intent from android
  • runOnUiThread (Activity)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • addToBackStack (FragmentTransaction)
  • URI (java.net)
    Represents a Uniform Resource Identifier (URI) reference. Aside from some minor deviations noted bel
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now