/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (https://www.swig.org).
 * Version 4.4.1
 *
 * Do not make changes to this file unless you know what you are doing - modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package com.robotraconteur;

public class LocalTransport extends Transport {
  private transient long swigCPtr;
  private transient boolean swigCMemOwnDerived;

  protected LocalTransport(long cPtr, boolean cMemoryOwn) {
    super(RobotRaconteurJavaJNI.LocalTransport_SWIGSmartPtrUpcast(cPtr), true);
    swigCMemOwnDerived = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(LocalTransport obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void swigSetCMemOwn(boolean own) {
    swigCMemOwnDerived = own;
    super.swigSetCMemOwn(own);
  }

  @SuppressWarnings({"deprecation", "removal"})
  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwnDerived) {
        swigCMemOwnDerived = false;
        RobotRaconteurJavaJNI.delete_LocalTransport(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public LocalTransport() {
    this(RobotRaconteurJavaJNI.new_LocalTransport__SWIG_0(), true);
  }

  public LocalTransport(RobotRaconteurNode node) {
    this(RobotRaconteurJavaJNI.new_LocalTransport__SWIG_1(RobotRaconteurNode.getCPtr(node), node), true);
  }

  public static boolean isLocalTransportSupported() {
    return RobotRaconteurJavaJNI.LocalTransport_isLocalTransportSupported();
  }

  public String getUrlSchemeString() {
    return RobotRaconteurJavaJNI.LocalTransport_getUrlSchemeString(swigCPtr, this);
  }

  public vectorstring getServerListenUrls() {
    return new vectorstring(RobotRaconteurJavaJNI.LocalTransport_getServerListenUrls(swigCPtr, this), true);
  }

  public void startClientAsNodeName(String name) {
    RobotRaconteurJavaJNI.LocalTransport_startClientAsNodeName(swigCPtr, this, name);
  }

  public void startServerAsNodeName(String name, boolean public_) {
    RobotRaconteurJavaJNI.LocalTransport_startServerAsNodeName__SWIG_0(swigCPtr, this, name, public_);
  }

  public void startServerAsNodeName(String name) {
    RobotRaconteurJavaJNI.LocalTransport_startServerAsNodeName__SWIG_1(swigCPtr, this, name);
  }

  public void startServerAsNodeID(NodeID nodeid, boolean public_) {
    RobotRaconteurJavaJNI.LocalTransport_startServerAsNodeID__SWIG_0(swigCPtr, this, NodeID.getCPtr(nodeid), nodeid, public_);
  }

  public void startServerAsNodeID(NodeID nodeid) {
    RobotRaconteurJavaJNI.LocalTransport_startServerAsNodeID__SWIG_1(swigCPtr, this, NodeID.getCPtr(nodeid), nodeid);
  }

  public void close() {
    RobotRaconteurJavaJNI.LocalTransport_close(swigCPtr, this);
  }

  public int getMaxMessageSize() {
    return RobotRaconteurJavaJNI.LocalTransport_getMaxMessageSize(swigCPtr, this);
  }

  public void setMaxMessageSize(int size) {
    RobotRaconteurJavaJNI.LocalTransport_setMaxMessageSize(swigCPtr, this, size);
  }

  public boolean getDisableMessage4() {
    return RobotRaconteurJavaJNI.LocalTransport_getDisableMessage4(swigCPtr, this);
  }

  public void setDisableMessage4(boolean d) {
    RobotRaconteurJavaJNI.LocalTransport_setDisableMessage4(swigCPtr, this, d);
  }

  public boolean getDisableStringTable() {
    return RobotRaconteurJavaJNI.LocalTransport_getDisableStringTable(swigCPtr, this);
  }

  public void setDisableStringTable(boolean d) {
    RobotRaconteurJavaJNI.LocalTransport_setDisableStringTable(swigCPtr, this, d);
  }

  public boolean getDisableAsyncMessageIO() {
    return RobotRaconteurJavaJNI.LocalTransport_getDisableAsyncMessageIO(swigCPtr, this);
  }

  public void setDisableAsyncMessageIO(boolean d) {
    RobotRaconteurJavaJNI.LocalTransport_setDisableAsyncMessageIO(swigCPtr, this, d);
  }

  public void enableNodeDiscoveryListening() {
    RobotRaconteurJavaJNI.LocalTransport_enableNodeDiscoveryListening(swigCPtr, this);
  }

  public void disableNodeDiscoveryListening() {
    RobotRaconteurJavaJNI.LocalTransport_disableNodeDiscoveryListening(swigCPtr, this);
  }

}
