com.opera.core.systems.scope.handlers
Interface IConnectionHandler

All Known Implementing Classes:
ScopeServices

public interface IConnectionHandler


Method Summary
 boolean onConnected(StpConnection connection)
          This event is emitted if the STP connection thread has accepted a connection.
 void onDisconnect()
          This event is triggered whenever the STP connection is closed.
 void onException(java.lang.Exception ex)
          This event is triggered if an exception is thrown on the STP connection thread.
 void onHandshake(boolean stp1)
          This event is triggered when we have received a response to enableStp1().
 void onResponseReceived(int tag, UmsProtos.Response response)
          This event is triggered whenever a command error response is received.
 void onServiceList(java.util.List<java.lang.String> services)
          This event is triggered when the webdriver received an initial service list from Opera.
 

Method Detail

onConnected

boolean onConnected(StpConnection connection)
This event is emitted if the STP connection thread has accepted a connection. If an STP connection has already been accepted the return value can be used to close the newly accepted connection.

Parameters:
connection - The connection that has been accepted.
Returns:
false if the connection should be closed immediately, or true to continue.

onServiceList

void onServiceList(java.util.List<java.lang.String> services)
This event is triggered when the webdriver received an initial service list from Opera.


onHandshake

void onHandshake(boolean stp1)
This event is triggered when we have received a response to enableStp1().

Parameters:
stp1 - true if handshake was an STP/1 response.

onDisconnect

void onDisconnect()
This event is triggered whenever the STP connection is closed.


onException

void onException(java.lang.Exception ex)
This event is triggered if an exception is thrown on the STP connection thread. Once this event has been triggered then the STP connection should be considered closed, and no further read/write operations are allowed.


onResponseReceived

void onResponseReceived(int tag,
                        UmsProtos.Response response)
This event is triggered whenever a command error response is received.

Parameters:
tag - the internal command tag corresponging to the request..
response - null if the response was an error.


Copyright © 2011. All Rights Reserved.