public class ProtocolAdapter extends Object implements ProtocolListener
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 and Description |
|---|
ProtocolAdapter() |
| Modifier and Type | Method and Description |
|---|---|
void |
onError(ErrorEvent e)
Provides an empty default implementation for the error event
of the implemented ProtocolListener event interface.
|
public void onError(ErrorEvent e)
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.
onError in interface ProtocolListenere - The event argument for the event handlerErrorEventCopyright © 2023. All rights reserved.