Class ProtocolAdapter
- java.lang.Object
-
- com.gurock.smartinspect.protocols.ProtocolAdapter
-
- All Implemented Interfaces:
ProtocolListener
public class ProtocolAdapter extends Object implements ProtocolListener
Represents the adapter class for the ProtocolListener event interface of the Protocol class.This class is added for convenience when dealing with the Protocol event system. This class implements the ProtocolListener interface by defining empty methods stubs. By deriving from this class instead of implementing the ProtocolListener interface directly, you can subscribe to certain events by overriding the appropriate methods and ignore other events which are of no use to you by keeping the empty default implementation of this class.
Note: Although the ProtocolListener interface currently has a single method only (for reporting exceptions), it is safer in terms of future API changes / improvements to derive from this class instead of implementing the ProtocolListener interface directly.
-
-
Constructor Summary
Constructors Constructor Description ProtocolAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonError(ErrorEvent e)Provides an empty default implementation for the error event of the implemented ProtocolListener event interface.
-
-
-
Method Detail
-
onError
public void onError(ErrorEvent e)
Provides an empty default implementation for the error event of the implemented ProtocolListener event interface.This method provides an empty default implementation for the error event. When deriving from this class, override this method if you are interested in getting notified about occurred protocol errors. The error event is only used when operating in asynchronous mode (see Protocol.isValidOption). When operating in normal blocking mode, the error event is never fired and exceptions are reporting by throwing them.
- Specified by:
onErrorin interfaceProtocolListener- Parameters:
e- The event argument for the event handler- See Also:
ErrorEvent
-
-