IConnector

it.unipmn.di.Meeting.Connectors.IConnector
it.unipmn.di.Meeting.Connectors.NetworkClass

The IConnector interface is used by components for interacting with the Connector, the object which supplies local and remote connectivity .

L’interfaccia IConnector viene usata dai componenti per interagire con il Connector, l’oggetto che offre la connettività locale o di rete.

FIXME: L’interfaccia è usata dal Core per inizializzare la connessione e aggiungere i componenti.

Summary
IConnectorThe IConnector interface is used by components for interacting with the Connector, the object which supplies local and remote connectivity .
Functions
sendThis method sends a message to the specified URI.
setReceiverThis method allows the component to receive a message from the server at a specified URI, using a method indicated by the method parameter.
getInfoThis method returns all the messages generated by the connection.
isConnectedThis method returns a boolean value that says if the Connector is connected.
unrecordNetStreamThis method allows a component to unregister a NetStream previously registered on the server.
unrecordSharedObjectThis method allows a component to unregister a SharedObject previously registered on the server.
unrecordAllSharedObjectThis method allows the component to unregister all the SharedObjects previously registered on the server.
recordSharedObjectThis method allows a component to register a SharedObject.
recordNetStreamThis method allows a component to register a NetStream.

Functions

send

function send (uri: String,
method: String,
param: Object):Void

This method sends a message to the specified URI.  The message is received server side by the method indicated by the method parameter.

Questo metodo invia un messaggio all’URI indicato che viene ricevuto lato server attraverso il metodo indicato dal parametro method.

Parameters

uri{String} URI of the component which receives the message / URI del componente che riceve il messaggio
method{String} name of the server side method which receives the message / nome del metodo che riceve il messaggio
param{Object} optional parameters the method receives / parametri opzionali che il metodo riceve

setReceiver

function setReceiver (uri: String,
method: String,
callback: Object,
object: Object):Void

This method allows the component to receive a message from the server at a specified URI, using a method indicated by the method parameter.  The message is delivered to the method method of the callback object.  The object parameter is set as a property in the callback object.

Questo metodo permette al componente di ricevere un messaggio dal server ad un determinato URI tramite un metodo dal nome method.  Il messaggio viene recapitato al metodo dell’oggetto callback dal nome method.  L’oggetto callback si vede sovrascritta la proprietà object con il valore del parametro object di questo metodo.

Parameters

uri{String} URI of the component which receives the message / URI del componente che riceve il messaggio
method{String} name of the method which receives the message / nome del metodo che riceve il messaggio
callback{Object} object that receives the message through the method method / oggetto che riceve il messagio tramite il metodo method
object{Object} extra object whose value is set in the callback object as a property.  This object is passed as first parameter to the method method / oggetto di supporto il cui valore è impostato nell’oggetto callback come proprietà.  Questo oggetto è passato come primo parametro al metodo method

getInfo

function getInfo ():Array

This method returns all the messages generated by the connection.

Questo metodo ritorna tutti i messaggi generati dalla connessione.

Returns

{Array} an array containing all the messages generated by the connection / un array contenente tutti i messaggi generati dalla connessione

isConnected

function isConnected():Boolean

This method returns a boolean value that says if the Connector is connected.

Questo metodo ritorna un valore di verità che descrive se il Connector è connesso.

Returns

{Boolean} connection state / stato dalla connessione

unrecordNetStream

function unrecordNetStream (name: String,
component: IClientComponent):Void

This method allows a component to unregister a NetStream previously registered on the server.

Questo metodo permette al componente di de-registrare un NetStream precedentemente registrato.

Parameters

name{String} NetStream name / nome del NetStream
component{IClientComponent} instance of the component associated with the NetStream / istanza del componente associato al NetStream

unrecordSharedObject

function unrecordSharedObject (name: String,
component: IClientComponent):Void

This method allows a component to unregister a SharedObject previously registered on the server.

Questo metodo permette al componente di de-registrare uno SharedObject precedentemente registrato.

Parameters

name{String} SharedObject name / nome dello SharedObject
component{IClientComponent} instance of the component associated with the SharedObject object / istanza del componente associato allo SharedObject

unrecordAllSharedObject

function unrecordAllSharedObject (component: IClientComponent):Void

This method allows the component to unregister all the SharedObjects previously registered on the server.

Questo metodo permette al componente di de-registrare tutti gli SharedObject precedentemente registrati.

Parameter

component{IClientComponent} instance of the component associated with the SharedObject objects / istanza del componente associato agli SharedObject

recordSharedObject

function recordSharedObject (name: String,
component: IClientComponent,
listener: Object,
object: Object,
persistence: Boolean,
callbacks: Object):SharedObject

This method allows a component to register a SharedObject.

Questo metodo permette al componente di registrare uno SharedObject.

Parameters

name{String} SharedObject name / nome dello SharedObject
component{IClientComponent} instance of the component associated with the SharedObject object / istanza del componente associato allo SharedObject
listener{Object} listener for the SharedObject events / listener per gli eventi dello SharedObject
object{Object} inside the SharedObject a property (named parent) points to this object / all’interno dello SharedObject viene creata una proprietà (di nome parent) che punta a questo oggetto
persistence{Boolean} it says if the SharedObject has to be persistent on the server / indica se lo SharedObject deve essere persistente sul server
callbacks{Object} object that contains methods that the SharedObject can call by its send() method / oggetto che contiene metodi che lo SharedObject può chiamare attraverso il suo metodo send()

Returns

{SharedObject} the SharedObject registered on the server / lo SharedObject registrato sul server.

recordNetStream

function recordNetStream (name: String,
component: IClientComponent,
listener: Object,
object: Object,
callbacks: Object):NetStream

This method allows a component to register a NetStream.

Questo metodo permette al componente di registrare un NetStream.

Parameters

name{String} NetStream name / nome del NetStream
component{IClientComponent} instance of the component associated with the NetStream / istanza del componente associato al NetStream
listener{Object} listener for NetStream events / listener per gli eventi del NetStream
object{Object} inside the NetStream a property (named parent) points to this object / all’interno del NetStream viene creata una proprietà (di nome parent) che punta a questo oggetto
callbacks{Object} object that contains methods that the NetStream can call by its send() method / oggetto che contiene metodi che il NetStream può chiamare attraverso il suo metodo send()

Returns

{NetStream} the registered NetStream / il NetStream registrato

function send (uri: String,
method: String,
param: Object):Void
This method sends a message to the specified URI.
function setReceiver (uri: String,
method: String,
callback: Object,
object: Object):Void
This method allows the component to receive a message from the server at a specified URI, using a method indicated by the method parameter.
function getInfo ():Array
This method returns all the messages generated by the connection.
function isConnected():Boolean
This method returns a boolean value that says if the Connector is connected.
function unrecordNetStream (name: String,
component: IClientComponent):Void
This method allows a component to unregister a NetStream previously registered on the server.
function unrecordSharedObject (name: String,
component: IClientComponent):Void
This method allows a component to unregister a SharedObject previously registered on the server.
function unrecordAllSharedObject (component: IClientComponent):Void
This method allows the component to unregister all the SharedObjects previously registered on the server.
function recordSharedObject (name: String,
component: IClientComponent,
listener: Object,
object: Object,
persistence: Boolean,
callbacks: Object):SharedObject
This method allows a component to register a SharedObject.
function recordNetStream (name: String,
component: IClientComponent,
listener: Object,
object: Object,
callbacks: Object):NetStream
This method allows a component to register a NetStream.