Class SmfConnection.Connectable
java.lang.Object
com.blackhillsoftware.smf.realtime.SmfConnection.Connectable
- Enclosing class:
SmfConnection
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 Summary
Modifier and TypeMethodDescriptionconnect()Connect to the In Memory ResourceClose the connection if a MVS STOP command is received.onMissedData(Consumer<MissedDataEvent> onMissedData) Setup a handler for a missed data event.
-
Method Details
-
connect
Connect to the In Memory Resource- Returns:
- a usable SmfConnection
- Throws:
IOException- If the connection attempt fails.
-
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
Setup a handler for a missed data event. The handler can take action as required and control whether an exception is thrown using theMissedDataEvent.The default action is to throw a
MissedDataException. SetMissedDataEvent.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.
-