Abstract: This page describes the Java class NetFactory and interface NetLayerIDs of the silvertunnel-ng.org Netlib API.
NetFactory is helper/factory class that can be used to get NetLayer. The instances are cached inside the factory, i.e. you will always get the same instance if you request a instance of the same type.
class org.silvertunnel.netlib.api.NetFactory overview:
public class NetFactory {
public static NetFactory getInstance() {...}
public NetLayer getNetLayerById(String netLayerId) {...}
...
}
important netLayerId values are defined as constants in org.silvertunnel.netlib.api.NetLayerIDs:
example to get a TorNetLayer:
// get TorNetLayer instance and wait until it is ready
NetLayer netLayer = NetFactory.getInstance().getNetLayerById(NetLayerIDs.TOR);
netLayer.waitUntilReady();
see [Netlib Direct API Usage] for more
Top: [Netlib], Next: [Netlib Tools]
Wiki: Netlib Direct API Usage
Wiki: Netlib Tools
Wiki: Netlib