Class SmfConnection.Connectable

java.lang.Object
com.blackhillsoftware.smf.realtime.SmfConnection.Connectable
Enclosing class:
SmfConnection

public static class SmfConnection.Connectable extends Object
Class used to set options for the SmfConnection prior to connection to the in memory resource. Returned by SmfConnection.forResourceName(String).

Call connect() to create a usable SmfConnection.

  • Method Details

    • connect

      public SmfConnection connect() throws IOException
      Connect to the In Memory Resource
      Returns:
      a usable SmfConnection
      Throws:
      IOException - If the connection attempt fails.
    • disconnectOnStop

      public SmfConnection.Connectable disconnectOnStop()
      Close the connection if a MVS STOP command is received. This will set up a command handler using the JZOS MvsConsole class.
      Returns:
      this Connectable. Call connect() to create a usable SmfConnection.
    • onMissedData

      public SmfConnection.Connectable onMissedData(Consumer<MissedDataEvent> onMissedData)
      Setup a handler for a missed data event. The handler can take action as required and control whether an exception is thrown using the MissedDataEvent.

      The default action is to throw a MissedDataException. Set MissedDataEvent.getThrowException() to false in the handler to suppress the exception.

      Parameters:
      onMissedData - A function to received the onMissedData event.
      Returns:
      this Connectable. Call connect() to create a usable SmfConnection.