pyrasun.eio
Interface EndpointEventListener

All Known Implementing Classes:
ByteArrayClientService, ByteArrayServerService, ObjectClientService, ObjectServerService, TelnetService

public interface EndpointEventListener

An EndpointEventListener generally gets signaled when something bad happens to your endpoint. You register one of these against each of your endpoints via Endpoint.registerEventListener(). NOTE: If you thought events got propogated to one of these, you were wrong and now owe me your first born children. Events actually get propogated to EIOWorkers, and that's one concept is confusing enough to give me quite a bit of job security here. Hey wait a minute, I'm unemployed!!! Argggh!!


Method Summary
 void endpointClosed(Endpoint endpoint, EIOReasonCode why, java.lang.String msg, java.lang.Throwable t, java.lang.Object context)
          A callback indicating that the specified endpoint was closed.
 void reportReadError(Endpoint endpoint, EIOReasonCode why, java.lang.String msg, java.lang.Throwable t, java.lang.Object context)
          Reports that a non-fatal error occured while reading from this endpoint.
 void reportWriteError(Endpoint endpoint, EIOReasonCode why, java.lang.String msg, java.lang.Throwable t, java.lang.Object context)
          Reports that a non-fatal error occured while writing to this endpoint.
 

Method Detail

endpointClosed

public void endpointClosed(Endpoint endpoint,
                           EIOReasonCode why,
                           java.lang.String msg,
                           java.lang.Throwable t,
                           java.lang.Object context)
A callback indicating that the specified endpoint was closed.

Parameters:
endpoint - The endpoint that was closed
why - Indicator as to why the endpoint was closed
msg - Semi-friendly text explaining in more detail why it was closed. May be null!
t - Exception that caused the close. May be null if an exception was not the cause
context - An object that indicates the context in which the close happened. Usually null, but app code may override with its own meaning

reportReadError

public void reportReadError(Endpoint endpoint,
                            EIOReasonCode why,
                            java.lang.String msg,
                            java.lang.Throwable t,
                            java.lang.Object context)
Reports that a non-fatal error occured while reading from this endpoint.


reportWriteError

public void reportWriteError(Endpoint endpoint,
                             EIOReasonCode why,
                             java.lang.String msg,
                             java.lang.Throwable t,
                             java.lang.Object context)
Reports that a non-fatal error occured while writing to this endpoint.



Pyrasun EmberIO