Class OltDeviceFactory

java.lang.Object
org.bgerp.plugin.bgb.getolt.telnet.OltDeviceFactory

public class OltDeviceFactory extends Object
Factory for creating vendor-specific OLT device instances. Ported from GetOltv2 GetData.java + ERP detectVendor.
  • Constructor Details

    • OltDeviceFactory

      public OltDeviceFactory()
  • Method Details

    • create

      public static OltDevice create(String vendor, String ip) throws IOException
      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

      public static OltDevice detectAndCreate(String ip) throws IOException
      v2-style detectAndCreate: connect → read banner → detect → create → return. Uses a single Telnet session for both detection and device creation.
      Throws:
      IOException
    • detectVendor

      public static String detectVendor(String ip) throws IOException
      Detect OLT vendor by connecting via Telnet and reading the greeting banner. Uses a separate session (ERP-specific, for scheduled vendor detection).
      Throws:
      IOException