
net.java.html.lib.node.http.Agent Maven / Gradle / Ivy
The newest version!
package net.java.html.lib.node.http;
public class Agent extends net.java.html.lib.Objs {
protected Agent(net.java.html.lib.Objs.Constructor> c, java.lang.Object js) {
super(c, js);
}
private static final class $Constructor extends net.java.html.lib.Objs.Constructor {
$Constructor() {
super(Agent.class);
}
@Override
public Agent create(java.lang.Object obj) {
return obj == null ? null : new Agent(this, obj);
}
};
private static final $Constructor $AS = new $Constructor();
public static Agent $as(java.lang.Object obj) {
return $AS.create(obj);
}
public net.java.html.lib.Objs.Property maxSockets = net.java.html.lib.Objs.Property.create(this, java.lang.Number.class, "maxSockets");
public java.lang.Number maxSockets() { return maxSockets.get(); }
public net.java.html.lib.Objs.Property sockets = net.java.html.lib.Objs.Property.create(this, java.lang.Object.class, "sockets");
public net.java.html.lib.Objs.Property requests = net.java.html.lib.Objs.Property.create(this, java.lang.Object.class, "requests");
public Agent(net.java.html.lib.node.http.AgentOptions opts) {
this(Agent.$AS, $Typings$.new$85(/* FirstTypeNode*/$js(opts)));
}
public Agent() {
this(Agent.$AS, $Typings$.new$86());
}
/**
* Destroy any sockets that are currently in use by the agent.
* It is usually not necessary to do this. However, if you are using an agent with KeepAlive enabled,
* then it is best to explicitly shut down the agent when you know that it will no longer be used. Otherwise,
* sockets may hang open for quite a long time before the server terminates them.
*/
public void destroy() {
$Typings$.destroy$87($js(this));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy