octoshape.osa2.listeners
Interface OctoshapeSystemListener


public interface OctoshapeSystemListener

Listens for information from the OctoshapeSystem class.


Method Summary
 void onConnect(java.lang.String authId)
          Called when the SDK obtains a connection to the Octoshape client.
 

Method Detail

onConnect

void onConnect(java.lang.String authId)
Called when the SDK obtains a connection to the Octoshape client. Note that this may happen more than one time during an SDK run.

The authId argument is a unique string generated each time the Octoshape client is launched, i.e. it may change during one run of the SDK, in which case this method will be called again. The string may be necessary when using the Octoshape Ticket System for stream authentication.

To authenticate individual streams using the StreamPlayer.setAuthorization(String, String)

Some client versions may be too old to correctly report the AuthId in this method. In that case the argument will be null.

Note that if the connection to the client is lost and automatically re-established by the OctoshapeSystem class, then any StreamPlayers that was in INITIALIZED or PLAYNG states before the connection broke, will automatically be re-initialized and/or brought into playing state. This means that if the client was restarted (and has a new auth-id), then any tickets constructed with the old ID will not work, and the StreamPlayer in question will dispatch a {"refused", "admin", "auth"}-Problem. Such a StreamPlayer can be started again by supplying a new ticket (created with the new auth-id), and then calling the appropriate initialize or requestPlay method again. Note that if the ticket was not constructed using the auth-id, the automatic re-initialization will work.

Parameters:
authId - The authId of the current Octoshape client launch, or null if the the client is too old for reporting this.