Skip to content
import Subcircuit from "@arcgis/core/networks/support/Subcircuit.js";
Inheritance:
SubcircuitAccessor
Since
ArcGIS Maps SDK for JavaScript 4.34
beta

Represents a subcircuit in a telecom domain network.

See also

Constructors

Constructor

Constructor
Parameters
ParameterTypeDescriptionRequired
properties
See the properties table for a list of all the properties that may be passed into the constructor.

Properties

Any properties can be set, retrieved or listened to. See the Watch for changes topic.

attributes

Property
Type
Record<string, any> | null | undefined

User-defined attributes on the subcircuit.

consumerId

Property
Type
string | null | undefined

The global ID of the circuit that consumes the subcircuit.

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor

The name of the class. The declared class name is formatted as esri.folder.className.

globalId

Property
Type
string | null | undefined

The global ID of the subcircuit.

name

Property
Type
string

The name of the subcircuit. This name is unique within a circuit.

providerId

Property
Type
string | null | undefined

The global ID of the provider circuit in which the subcircuit participates.

state

Property
Type
SubcircuitState

The state of the subcircuit. A subcircuit can be in one of three states:

  1. Consumed: The subcircuit is used in the definition of another circuit.
  2. Reserved: The subcircuit is assigned to its provider circuit and is not available for consumption by other circuits.
  3. Available: The subcircuit is not used in the definition of another circuit (consumed) or assigned to the provider (reserved).
Default value
"available"

Methods

MethodSignatureClass
fromJSON
inherited static
fromJSON(json: any): any
emit
inherited
emit<Type extends EventNames<this>>(type: Type, event?: this["@eventTypes"][Type]): boolean
getAttribute<T = any>(name: string): T
hasEventListener
inherited
hasEventListener<Type extends EventNames<this>>(type: Type): boolean
on
inherited
on<Type extends EventNames<this>>(type: Type, listener: EventedCallback<this["@eventTypes"][Type]>): ResourceHandle
setAttribute(name: string, newValue: any): void
toJSON
inherited
toJSON(): any

fromJSON

inheritedstatic Method
Signature
fromJSON (json: any): any
Inherited from: JSONSupportMixin

Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product. The object passed into the input json parameter often comes from a response to a query operation in the REST API or a toJSON() method from another ArcGIS product. See the Using fromJSON() topic in the Guide for details and examples of when and how to use this function.

Parameters
ParameterTypeDescriptionRequired
json
any

A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.

Returns
any

Returns a new instance of this class.

emit

inherited Method
Signature
emit <Type extends EventNames<this>>(type: Type, event?: this["@eventTypes"][Type]): boolean
Type parameters
<Type extends EventNames<this>>
Inherited from: EventedMixin

Emits an event on the instance. This method should only be used when creating subclasses of this class.

Parameters
ParameterTypeDescriptionRequired
type
Type

The name of the event.

event
this["@eventTypes"][Type]

The event payload.

Returns
boolean

true if a listener was notified

getAttribute

Method
Signature
getAttribute <T = any>(name: string): T
Type parameters
<T = any>

Returns the value of the specified user-defined attribute.

Parameters
ParameterTypeDescriptionRequired
name

The name of the attribute.

Returns
T

Returns the value of the attribute specified by name.

hasEventListener

inherited Method
Signature
hasEventListener <Type extends EventNames<this>>(type: Type): boolean
Type parameters
<Type extends EventNames<this>>
Inherited from: EventedMixin

Indicates whether there is an event listener on the instance that matches the provided event name.

Parameters
ParameterTypeDescriptionRequired
type
Type

The name of the event.

Returns
boolean

Returns true if the class supports the input event.

on

inherited Method
Signature
on <Type extends EventNames<this>>(type: Type, listener: EventedCallback<this["@eventTypes"][Type]>): ResourceHandle
Type parameters
<Type extends EventNames<this>>
Inherited from: EventedMixin

Registers an event handler on the instance. Call this method to hook an event with a listener.

Parameters
ParameterTypeDescriptionRequired
type
Type

An event or an array of events to listen for.

listener
EventedCallback<this["@eventTypes"][Type]>

The function to call when the event fires.

Returns
ResourceHandle

Returns an event handler with a remove() method that should be called to stop listening for the event(s).

PropertyTypeDescription
removeFunctionWhen called, removes the listener from the event.
Example
view.on("click", function(event){
// event is the event handle returned after the event fires.
console.log(event.mapPoint);
});

setAttribute

Method
Signature
setAttribute (name: string, newValue: any): void

Sets a new value for the specified user-defined attribute.

Parameters
ParameterTypeDescriptionRequired
name

The name of the attribute to set.

newValue
any

The new value to set on the named attribute.

Returns
void

toJSON

inherited Method
Signature
toJSON (): any
Inherited from: JSONSupportMixin

Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.

Returns
any

The ArcGIS portal JSON representation of an instance of this class.

Type definitions