Class Protocol

java.lang.Object
com.framed.core.Service
com.framed.communicator.driver.protocol.Protocol
Direct Known Subclasses:
MedibusProtocol

public abstract class Protocol extends Service
Represents an abstract communication protocol that extends the Service class.

A protocol is responsible for establishing and managing a connection between FRAMED and a particular Device using a specific communication standard or mechanism.

This class provides a base for concrete protocol implementations, requiring them to define the connect() method for establishing a connection.

  • Field Details

    • id

      protected String id
      Unique identifier for this protocol instance.
  • Constructor Details

    • Protocol

      public Protocol(String id, EventBus eventBus)
      Creates a new Protocol instance.
      Parameters:
      id - the unique identifier for the protocol
      eventBus - the event bus used for communication and event handling
  • Method Details

    • connect

      public abstract void connect()
      Establishes a connection using the specific protocol implementation and starts the configured data export. Concrete subclasses must provide the logic for connecting.