// Code generated by gobind. DO NOT EDIT.

// Java class io.nekohasekai.libbox.CommandServer is a proxy for talking to a Go program.
//
//   autogenerated by gobind -lang=java -javapkg=io.nekohasekai github.com/sagernet/sing-box/experimental/libbox
package io.nekohasekai.libbox;

import go.Seq;

public final class CommandServer implements Seq.Proxy {
	static { Libbox.touch(); }
	
	public final int refnum;
	
	@Override public final int incRefnum() {
	      Seq.incGoRef(refnum, this);
	      return refnum;
	}
	
	public CommandServer(CommandServerHandler handler, int maxLines) {
		this.refnum = __NewCommandServer(handler, maxLines);
		Seq.trackGoRef(refnum, this);
	}
	
	private static native int __NewCommandServer(CommandServerHandler handler, int maxLines);
	
	CommandServer(int refnum) { this.refnum = refnum; Seq.trackGoRef(refnum, this); }
	
	public native void close() throws Exception;
	public native void resetLog();
	public native void setService(BoxService newService);
	public native void start() throws Exception;
	public native void writeMessage(String message);
	@Override public boolean equals(Object o) {
		if (o == null || !(o instanceof CommandServer)) {
		    return false;
		}
		CommandServer that = (CommandServer)o;
		return true;
	}
	
	@Override public int hashCode() {
	    return java.util.Arrays.hashCode(new Object[] {});
	}
	
	@Override public String toString() {
		StringBuilder b = new StringBuilder();
		b.append("CommandServer").append("{");
		return b.append("}").toString();
	}
}

