Class OltDeviceFactory
java.lang.Object
org.bgerp.plugin.bgb.getolt.telnet.OltDeviceFactory
Factory for creating vendor-specific OLT device instances.
Ported from GetOltv2 GetData.java + ERP detectVendor.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OltDeviceCreates an OLT device by vendor name using IP-based constructor (new Telnet session).static OltDeviceCreates an OLT device by vendor name with authentication.static OltDevicecreateFromTelnet(String vendor, TelnetSession telnet, String banner) Creates an OLT device from an existing Telnet session (v2-style GetData.createOLT).static OltDevicev2-style detectAndCreate: connect → read banner → detect → create → return.static StringdetectVendor(String ip) Detect OLT vendor by connecting via Telnet and reading the greeting banner.
-
Constructor Details
-
OltDeviceFactory
public OltDeviceFactory()
-
-
Method Details
-
create
Creates an OLT device by vendor name using IP-based constructor (new Telnet session).- Throws:
IOException
-
create
public static OltDevice create(String vendor, String ip, String login, String password) throws IOException Creates an OLT device by vendor name with authentication.- Throws:
IOException
-
createFromTelnet
public static OltDevice createFromTelnet(String vendor, TelnetSession telnet, String banner) throws IOException Creates an OLT device from an existing Telnet session (v2-style GetData.createOLT).- Throws:
IOException
-
detectAndCreate
v2-style detectAndCreate: connect → read banner → detect → create → return. Uses a single Telnet session for both detection and device creation.- Throws:
IOException
-
detectVendor
Detect OLT vendor by connecting via Telnet and reading the greeting banner. Uses a separate session (ERP-specific, for scheduled vendor detection).- Throws:
IOException
-