flash.net

# GroupSpecifier - AS3

Package | flash.net
Class | public class GroupSpecifier
Inheritance | GroupSpecifier Object

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

The GroupSpecifier class is used to construct the opaque `groupspec` strings that can be passed to NetStream and NetGroup constructors. A `groupspec` specifies an RTMFP Peer-to-Peer Group, including the capabilities, restrictions, and authorizations of the member using the `groupspec`.

By default, all capabilities are disabled, and peer-to-peer connections are allowed.

Related API Elements

flash.net.NetGroup
flash.net.NetStream

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined By
--- | --- | ---
|  | constructor : Object A reference to the class object or constructor function for a given object instance. | Object
|  | ipMulticastMemberUpdatesEnabled : Boolean Specifies whether information about group membership can be exchanged on IP multicast sockets. | GroupSpecifier
|  | maxSupportedGroupspecVersion : int [static] [read-only] Specifies the maximum groupspec version supported by this runtime. | GroupSpecifier
|  | minGroupspecVersion : int Specifies the minimum version number the generated groupspec will have. | GroupSpecifier
|  | multicastEnabled : Boolean Specifies whether streaming is enabled for the NetGroup. | GroupSpecifier
|  | objectReplicationEnabled : Boolean Specifies whether object replication is enabled for the NetGroup. | GroupSpecifier
|  | peerToPeerDisabled : Boolean Specifies whether peer-to-peer connections are disabled for the NetGroup or NetStream. | GroupSpecifier
|  | postingEnabled : Boolean Specifies whether posting is enabled for the NetGroup. | GroupSpecifier
|  | routingEnabled : Boolean Specifies whether directed routing methods are enabled for the NetGroup. | GroupSpecifier
|  | serverChannelEnabled : Boolean Specifies whether members of the NetGroup can open a channel to the server. | GroupSpecifier

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | GroupSpecifier(name:String) Creates a new GroupSpecifier object. | GroupSpecifier
|  | addBootstrapPeer(peerID:String):void Causes the associated NetStream or NetGroup to make an initial neighbor connection to the specified peerID. | GroupSpecifier
|  | addIPMulticastAddress(address:String, port:* = null, source:String = null):void Causes the associated NetStream or NetGroup to join the specified IP multicast group and listen to the specified UDP port. | GroupSpecifier
|  | authorizations():String Returns a string that represents passwords for IP multicast publishing and for posting. | GroupSpecifier
|  | encodeBootstrapPeerIDSpec(peerID:String):String [static] Encodes and returns a string that represents a bootstrap peerID. | GroupSpecifier
|  | encodeIPMulticastAddressSpec(address:String, port:* = null, source:String = null):String [static] Encodes and returns a string that represents an IP multicast socket address. | GroupSpecifier
|  | encodePostingAuthorization(password:String):String [static] Encodes and returns a string that represents a posting password. | GroupSpecifier
|  | encodePublishAuthorization(password:String):String [static] Encodes and returns a string that represents a multicast publishing password. | GroupSpecifier
|  | groupspecWithAuthorizations():String Returns the opaque groupspec string, including authorizations, that can be passed to NetStream and NetGroup constructors. | GroupSpecifier
|  | groupspecWithoutAuthorizations():String Returns the opaque groupspec string, without authorizations, that can be passed to NetStream and NetGroup constructors. | GroupSpecifier
|  | hasOwnProperty(name:String):Boolean Indicates whether an object has a specified property defined. | Object
|  | isPrototypeOf(theClass:Object):Boolean Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter. | Object
|  | makeUnique():void Adds a strong pseudorandom tag to the groupspec to make it unique. | GroupSpecifier
|  | propertyIsEnumerable(name:String):Boolean Indicates whether the specified property exists and is enumerable. | Object
|  | setPostingPassword(password:String = null, salt:String = null):void Specifies whether a password is required to post in the NetGroup. | GroupSpecifier
|  | setPropertyIsEnumerable(name:String, isEnum:Boolean = true):void Sets the availability of a dynamic property for loop operations. | Object
|  | setPublishPassword(password:String = null, salt:String = null):void Specifies whether a password is required to publish a multicast stream in the NetStream. | GroupSpecifier
|  | toLocaleString():String Returns the string representation of this object, formatted according to locale-specific conventions. | Object
|  | toString():String Identical to the groupspecWithAuthorizations() method. | GroupSpecifier
|  | valueOf():Object Returns the primitive value of the specified object. | Object

Property Detail

### ipMulticastMemberUpdatesEnabled

property

`ipMulticastMemberUpdatesEnabled:Boolean`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

Specifies whether information about group membership can be exchanged on IP multicast sockets. IP multicast servers may send group membership updates to help bootstrap P2P meshes or heal partitions. Peers may send membership updates on the LAN to help bootstrap LAN P2P meshes and to inform on-LAN neighbors in global meshes that other on-LAN neighbors exist. These updates can improve P2P performance.

Implementation
`public function get ipMulticastMemberUpdatesEnabled():Boolean`
`public function set ipMulticastMemberUpdatesEnabled(value:Boolean):void`

Related API Elements

addIPMulticastAddress()
peerToPeerDisabled

### maxSupportedGroupspecVersion

property

`maxSupportedGroupspecVersion:int` [read-only]

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 11.5, AIR 3

Specifies the maximum `groupspec` version supported by this runtime. A `groupspec` having a version greater than this will fail in this runtime.

Implementation
`public static function get maxSupportedGroupspecVersion():int`

Related API Elements

minGroupspecVersion

### minGroupspecVersion

property

`minGroupspecVersion:int`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 11.5, AIR 3

Specifies the minimum version number the generated `groupspec` will have. The `groupspec` version number may be higher than this value if an option requiring a higher version number is enabled. A `groupspec` having a version number lower than the minimum supported will fail.

Implementation
`public function get minGroupspecVersion():int`
`public function set minGroupspecVersion(value:int):void`

Related API Elements

maxSupportedGroupspecVersion

### multicastEnabled

property

`multicastEnabled:Boolean`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

Specifies whether streaming is enabled for the NetGroup. Methods used for streaming are `NetStream.publish()`, `NetStream.play()`, and `NetStream.play2()`. By default, this property is FALSE (streaming is disabled).

Implementation
`public function get multicastEnabled():Boolean`
`public function set multicastEnabled(value:Boolean):void`

Related API Elements

setPublishPassword()
flash.net.NetStream.play()
flash.net.NetStream.play2()
flash.net.NetStream.publish()

### objectReplicationEnabled

property

`objectReplicationEnabled:Boolean`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

Specifies whether object replication is enabled for the NetGroup. By default, this property is FALSE (object replication is disabled).

Implementation
`public function get objectReplicationEnabled():Boolean`
`public function set objectReplicationEnabled(value:Boolean):void`

Related API Elements

flash.net.NetGroup.addHaveObjects()
flash.net.NetGroup.addWantObjects()
flash.net.NetGroup.denyRequestedObject()
flash.net.NetGroup.removeHaveObjects()
flash.net.NetGroup.removeWantObjects()
flash.net.NetGroup.writeRequestedObject()

### peerToPeerDisabled

property

`peerToPeerDisabled:Boolean`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

Specifies whether peer-to-peer connections are disabled for the NetGroup or NetStream. By default, this property is FALSE (P2P connections are enabled).

If P2P connections are disabled (you set this property to TRUE), the P2P warning dialog is suppressed. In this situation, no neighbor connections can be made, and no group members use upstream bandwidth. Disabling P2P connections in this way is generally useful only when receiving multicast streams via pure IP multicast.

Implementation
`public function get peerToPeerDisabled():Boolean`
`public function set peerToPeerDisabled(value:Boolean):void`

### postingEnabled

property

`postingEnabled:Boolean`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

Specifies whether posting is enabled for the NetGroup. By default, this property is FALSE (posting is disabled).

Implementation
`public function get postingEnabled():Boolean`
`public function set postingEnabled(value:Boolean):void`

Related API Elements

flash.net.NetGroup.post()

### routingEnabled

property

`routingEnabled:Boolean`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

Specifies whether directed routing methods are enabled for the NetGroup. By default, this property is FALSE (directed routing methods are disabled).

Implementation
`public function get routingEnabled():Boolean`
`public function set routingEnabled(value:Boolean):void`

Related API Elements

flash.net.NetGroup.sendToNearest()

### serverChannelEnabled

property

`serverChannelEnabled:Boolean`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

Specifies whether members of the NetGroup can open a channel to the server. By default, this property is FALSE.

A channel to the server must be opened before the server can provide supporting functions to group members. Depending on server configuration, supporting functions may or may not be provided over this channel.

Implementation
`public function get serverChannelEnabled():Boolean`
`public function set serverChannelEnabled(value:Boolean):void`
Constructor Detail

### GroupSpecifier

()
Constructor

`public function GroupSpecifier(name:String)`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

Creates a new GroupSpecifier object. By default, all capabilities are disabled, and peer-to-peer connections are allowed.

Parameters

| `name:String` — A name for the Group on which all members must agree.

Throws

| `ArgumentError` — if `name` is empty or `null`.

Related API Elements

flash.net.NetGroup
flash.net.NetStream
Method Detail

### addBootstrapPeer

()
method

`public function addBootstrapPeer(peerID:String):void`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

Causes the associated NetStream or NetGroup to make an initial neighbor connection to the specified peerID.

Parameters

| `peerID:String` — The peerID to which an initial neighbor connection should be made to bootstrap into the peer-to-peer mesh.

Related API Elements

encodeBootstrapPeerIDSpec()
flash.net.NetGroup.addMemberHint()
flash.net.NetGroup.addNeighbor()

### addIPMulticastAddress

()
method

`public function addIPMulticastAddress(address:String, port:* = null, source:String = null):void`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

Causes the associated NetStream or NetGroup to join the specified IP multicast group and listen to the specified UDP port.

Parameters

| `address:String` — A String specifying the address of the IPv4 or IPv6 multicast group to join, optionally followed by a colon (":") and the UDP port number. If specifying an IPv6 address and a port, the IPv6 address must be enclosed in square brackets. Examples: `"224.0.0.254"`, `"224.0.0.254:30000"`, `"ff03::ffff"`, `"[ff03::ffff]:30000"`.
| `port:*` (default = `null`)`` — The UDP port on which to receive IP multicast datagrams. If `port` is `null`, the UDP port must be specified in `address`. If not `null`, the UDP port must not be specified in `address`.
| `source:String` (default = `null`)`` — If not `null`, a String specifying the source IP address of a source-specific multicast (SSM).

Related API Elements

encodeIPMulticastAddressSpec()
ipMulticastMemberUpdatesEnabled

### authorizations

()
method

`public function authorizations():String`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

Returns a string that represents passwords for IP multicast publishing and for posting. Append the string to an unauthorized `groupspec` to enable features for which passwords have been set.

Returns

| `String`

Related API Elements

encodePostingAuthorization()
encodePublishAuthorization()
groupspecWithAuthorizations()
groupspecWithoutAuthorizations()
setPostingPassword()
setPublishPassword()

### encodeBootstrapPeerIDSpec

()
method

`public static function encodeBootstrapPeerIDSpec(peerID:String):String`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

Encodes and returns a string that represents a bootstrap peerID. If you append the string to a `groupspec`, the associated NetStream or NetGroup makes an initial neighbor connection to the specified peerID.

Parameters

| `peerID:String` — The peerID to which an initial neighbor connection should be made to bootstrap into the peer-to-peer mesh.

Returns

| `String`

Related API Elements

addBootstrapPeer()
flash.net.NetGroup.addMemberHint()
flash.net.NetGroup.addNeighbor()

### encodeIPMulticastAddressSpec

()
method

`public static function encodeIPMulticastAddressSpec(address:String, port:* = null, source:String = null):String`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

Encodes and returns a string that represents an IP multicast socket address. If you append the string to a `groupspec`, the associated NetStream or NetGroup joins the specified IP multicast group and listens to the specified UDP port.

Parameters

| `address:String` — A String indicating the address of the IPv4 or IPv6 multicast group to join, optionally followed by a colon (":") and the UDP port number. If specifying an IPv6 address and a port, the IPv6 address must be enclosed in square brackets. Examples: `"224.0.0.254"`, `"224.0.0.254:30000"`, `"ff03::ffff"`, `"[ff03::ffff]:30000"`.
| `port:*` (default = `null`)`` — The UDP port on which to receive IP multicast datagrams. If `port` is `null`, the UDP port must be specified in `address`. If not `null`, the UDP port must not be specified in `address`.
| `source:String` (default = `null`)`` — If not `null`, a String specifying the source IP address of a source-specific multicast (SSM).

Returns

| `String`

Related API Elements

addIPMulticastAddress()
ipMulticastMemberUpdatesEnabled

### encodePostingAuthorization

()
method

`public static function encodePostingAuthorization(password:String):String`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

Encodes and returns a string that represents a posting password. When posting is password-protected, you can concatenate the string to a `groupspec` to enable posting.

Parameters

| `password:String` — The password to encode, which must match the posting password (if set) to enable `NetGroup.post()`.

Returns

| `String`

Related API Elements

groupspecWithoutAuthorizations()
setPostingPassword()
flash.net.NetGroup.post()

### encodePublishAuthorization

()
method

`public static function encodePublishAuthorization(password:String):String`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

Encodes and returns a string that represents a multicast publishing password. When multicast publishing is password-protected, you can concatenate the string to a `groupspec` to enable publishing.

Parameters

| `password:String` — The password to encode, which must match the publish password (if set) to enable `NetStream.publish()`.

Returns

| `String`

Related API Elements

groupspecWithoutAuthorizations()
setPublishPassword()
flash.net.NetStream.publish()

### groupspecWithAuthorizations

()
method

`public function groupspecWithAuthorizations():String`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

Returns the opaque `groupspec` string, including authorizations, that can be passed to NetStream and NetGroup constructors.

Returns

| `String`

Related API Elements

authorizations()
groupspecWithoutAuthorizations()
setPostingPassword()
setPublishPassword()
toString()

### groupspecWithoutAuthorizations

()
method

`public function groupspecWithoutAuthorizations():String`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

Returns the opaque `groupspec` string, without authorizations, that can be passed to NetStream and NetGroup constructors.

Returns

| `String`

Related API Elements

authorizations()
encodePostingAuthorization()
encodePublishAuthorization()
groupspecWithAuthorizations()

### makeUnique

()
method

`public function makeUnique():void`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

Adds a strong pseudorandom tag to the `groupspec` to make it unique. The opaque `groupspec` string must then be passed verbatim to other potential members of the Group if they are to successfully join.

### setPostingPassword

()
method

`public function setPostingPassword(password:String = null, salt:String = null):void`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

Specifies whether a password is required to post in the NetGroup.

Parameters

| `password:String` (default = `null`)`` — The password that must be given to use `NetGroup.post()`. If `null`, no password is required to post.
| `salt:String` (default = `null`)`` — Modifies the hash of the password to increase the difficulty of guessing it. For best security, this parameter should be set to a random value.

Related API Elements

encodePostingAuthorization()
groupspecWithAuthorizations()
groupspecWithoutAuthorizations()
flash.net.NetGroup.post()

### setPublishPassword

()
method

`public function setPublishPassword(password:String = null, salt:String = null):void`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

Specifies whether a password is required to publish a multicast stream in the NetStream.

Parameters

| `password:String` (default = `null`)`` — The password that must be given to use `NetStream.publish()`. If `null`, no password is required to publish.
| `salt:String` (default = `null`)`` — Modifies the hash of the password to increase the difficulty of guessing it. For best security, this parameter should be set to a random value.

Related API Elements

encodePublishAuthorization()
groupspecWithAuthorizations()
groupspecWithoutAuthorizations()
flash.net.NetStream.publish()

### toString

()
method

`public function toString():String`

Language Version: | ActionScript 3.0

Runtime Versions: | Flash Player 10.1, AIR 2

Identical to the `groupspecWithAuthorizations()` method. Convenience method to return the opaque `groupspec` string, including authorizations, that can be passed to NetStream and NetGroup constructors.

Returns

| `String`

Related API Elements

groupspecWithAuthorizations()

© 2015 Adobe Systems Incorporated. All rights reserved.
Mon Apr 10 2017, 12:28 PM -07:00