| 패키지 | mx.messaging |
| 클래스 | public class AbstractProducer |
| 상속 | AbstractProducer MessageAgent EventDispatcher Object |
| 하위 클래스 | MultiTopicProducer, Producer |
| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services for Java EE 3 |
| 런타임 버전: | Flash Player 9, AIR 1.1 |
| 속성 | 정의 주체 | ||
|---|---|---|---|
![]() | authenticated : Boolean [읽기 전용]
Indicates if this MessageAgent is using an authenticated connection to
its destination. | MessageAgent | |
| autoConnect : Boolean
If true the Producer automatically connects to its destination the
first time the send() method is called. | AbstractProducer | ||
![]() | channelSet : ChannelSet
Provides access to the ChannelSet used by the MessageAgent. | MessageAgent | |
![]() | clientId : String [읽기 전용]
Provides access to the client id for the MessageAgent. | MessageAgent | |
![]() | connected : Boolean [읽기 전용]
Indicates whether this MessageAgent is currently connected to its
destination via its ChannelSet. | MessageAgent | |
![]() | constructor : Object
지정된 객체 인스턴스의 클래스 객체 또는 생성자 함수에 대한 참조입니다. | Object | |
| defaultHeaders : Object
The default headers to apply to messages sent by the Producer. | AbstractProducer | ||
![]() | destination : String
Provides access to the destination for the MessageAgent. | MessageAgent | |
| priority : int
The default message priority for the messages sent by the Producer. | AbstractProducer | ||
| reconnectAttempts : int
The number of reconnect attempts that the Producer makes in the event
that the destination is unavailable or the connection to the destination closes. | AbstractProducer | ||
| reconnectInterval : int
The number of milliseconds between reconnect attempts. | AbstractProducer | ||
![]() | requestTimeout : int
Provides access to the request timeout in seconds for sent messages. | MessageAgent | |
| 메서드 | 정의 주체 | ||
|---|---|---|---|
![]() |
Invoked by a MessageResponder upon receiving a result for a sent
message. | MessageAgent | |
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
리스너에서 이벤트 알림을 받을 수 있도록 EventDispatcher 객체에 이벤트 리스너 객체를 등록합니다. | EventDispatcher | |
![]() |
Handles a CONNECT ChannelEvent. | MessageAgent | |
![]() |
Handles a DISCONNECT ChannelEvent. | MessageAgent | |
![]() |
Handles a ChannelFaultEvent. | MessageAgent | |
Connects the Producer to its target destination. | AbstractProducer | ||
[재정의]
Disconnects the Producer from its remote destination. | AbstractProducer | ||
![]() |
이벤트를 이벤트 흐름으로 전달합니다. | EventDispatcher | |
![]() |
Invoked by a MessageResponder upon receiving a fault for a sent message. | MessageAgent | |
![]() |
EventDispatcher 객체에 특정 유형의 이벤트에 대한 리스너가 등록되어 있는지 여부를 확인합니다. | EventDispatcher | |
![]() |
지정된 속성이 객체에 정의되어 있는지 여부를 나타냅니다. | Object | |
![]() |
Returns true if there are any pending requests for the passed in message. | MessageAgent | |
![]() |
Called after the implementing object has been created
and all properties specified on the tag have been assigned. | MessageAgent | |
![]() |
Object 클래스의 인스턴스가 매개 변수로 지정된 객체의 프로토타입 체인에 있는지 여부를 나타냅니다. | Object | |
![]() |
Logs the MessageAgent out from its remote destination. | MessageAgent | |
![]() |
지정된 속성이 존재하고 열거 가능한지 여부를 나타냅니다. | Object | |
![]() |
EventDispatcher 객체에서 리스너를 제거합니다. | EventDispatcher | |
Sends the specified message to its destination. | AbstractProducer | ||
![]() |
Sets the credentials that the MessageAgent uses to authenticate to
destinations. | MessageAgent | |
![]() |
루프 작업에서 동적 속성을 사용할 수 있는지 여부를 설정합니다. | Object | |
![]() |
Sets the remote credentials that will be passed through to the remote destination
for authenticating to secondary systems. | MessageAgent | |
![]() |
로캘별 규칙에 따라 서식이 지정된 이 객체의 문자열 표현을 반환합니다. | Object | |
![]() |
지정된 객체의 문자열 표현을 반환합니다. | Object | |
![]() |
지정된 객체의 프리미티브 값을 반환합니다. | Object | |
![]() |
이 EventDispatcher 객체 또는 조상 객체에 지정한 이벤트 유형에 대한 이벤트 리스너가 등록되어 있는지 여부를 확인합니다. | EventDispatcher | |
autoConnect | 속성 |
autoConnect:Boolean| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services for Java EE 3 |
| 런타임 버전: | Flash Player 9, AIR 1.1 |
If true the Producer automatically connects to its destination the
first time the send() method is called.
If false then the connect() method must be called explicitly to
establish a connection to the destination.
By default this property is true, but applications that need to operate
in an offline mode may set this to false to prevent the send() method
from connecting implicitly.
이 속성은 데이터 바인딩에 대한 소스로 사용할 수 있습니다. 이 속성을 수정하면 propertyChange 이벤트를 전달합니다.
구현
public function get autoConnect():Boolean public function set autoConnect(value:Boolean):voiddefaultHeaders | 속성 |
defaultHeaders:Object| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services for Java EE 3 |
| 런타임 버전: | Flash Player 9, AIR 1.1 |
The default headers to apply to messages sent by the Producer. Any default headers that do not exist in the message will be created. If the message already contains a matching header, the value in the message takes precedence and the default header value is ignored.
이 속성은 데이터 바인딩에 대한 소스로 사용할 수 있습니다. 이 속성을 수정하면 propertyChange 이벤트를 전달합니다.
구현
public function get defaultHeaders():Object public function set defaultHeaders(value:Object):voidpriority | 속성 |
priority:int| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services for Java EE 3 |
| 런타임 버전: | Flash Player 9, AIR 1.1 |
The default message priority for the messages sent by the Producer. The valid values are 0 to 9 (0 being lowest) and -1 means that the Producer does not have a priority set. Note that if the message already has a priority defined, that takes precedence over Producer's priority.
이 속성은 데이터 바인딩에 대한 소스로 사용할 수 있습니다. 이 속성을 수정하면 propertyChange 이벤트를 전달합니다.
구현
public function get priority():int public function set priority(value:int):voidreconnectAttempts | 속성 |
reconnectAttempts:int| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services for Java EE 3 |
| 런타임 버전: | Flash Player 9, AIR 1.1 |
The number of reconnect attempts that the Producer makes in the event that the destination is unavailable or the connection to the destination closes. A value of -1 enables infinite attempts. A value of zero disables reconnect attempts.
Reconnect attempts are made at a constant rate according to the reconnect interval value. When a reconnect attempt is made if the underlying channel for the Producer is not connected or attempting to connect the channel will start a connect attempt. Subsequent Producer reconnect attempts that occur while the underlying channel connect attempt is outstanding are effectively ignored until the outstanding channel connect attempt succeeds or fails.
이 속성은 데이터 바인딩에 대한 소스로 사용할 수 있습니다. 이 속성을 수정하면 propertyChange 이벤트를 전달합니다.
구현
public function get reconnectAttempts():int public function set reconnectAttempts(value:int):void관련 API 요소
reconnectInterval | 속성 |
reconnectInterval:int| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services for Java EE 3 |
| 런타임 버전: | Flash Player 9, AIR 1.1 |
The number of milliseconds between reconnect attempts. If a Producer doesn't receive an acknowledgement for a connect attempt, it will wait the specified number of milliseconds before making a subsequent reconnect attempt. Setting the value to zero disables reconnect attempts.
Reconnect attempts are made at a constant rate according to this value. When a reconnect attempt is made if the underlying channel for the Producer is not connected or attempting to connect the channel will start a connect attempt. Subsequent Producer reconnect attempts that occur while the underlying channel connect attempt is outstanding are effectively ignored until the outstanding channel connect attempt succeeds or fails.
이 속성은 데이터 바인딩에 대한 소스로 사용할 수 있습니다. 이 속성을 수정하면 propertyChange 이벤트를 전달합니다.
구현
public function get reconnectInterval():int public function set reconnectInterval(value:int):void오류
ArgumentError — If the assigned value is negative.
|
관련 API 요소
connect | () | 메서드 |
public function connect():void| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services for Java EE 3 |
| 런타임 버전: | Flash Player 9, AIR 1.1 |
Connects the Producer to its target destination.
When a connection is established the connected property will
change to true and this property is bindable and generates
PropertyChangeEvents.
The internal TRIGGER_CONNECT_OPERATION CommandMessage that is sent will result
in an acknowledge or fault event depending upon whether the underlying channel
establishes its connection.
오류
InvalidDestinationError — If no destination is set.
|
예제
예제 사용 방법
var producer:Producer = new Producer();
producer.destination = "TestTopic";
producer.addEventListener(PropertyChangeEvent.PROPERTY_CHANGE, handleConnect);
producer.connect();
disconnect | () | 메서드 |
override public function disconnect():void| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services for Java EE 3 |
| 런타임 버전: | Flash Player 9, AIR 1.1 |
Disconnects the Producer from its remote destination.
This method does not wait for outstanding network operations to complete.
After invoking disconnect(), the Producer will report that it is not
connected and it will not receive any outstanding message acknowledgements or faults.
Disconnecting stops automatic reconnect attempts if they are running.
send | () | 메서드 |
public function send(message:IMessage):void| 언어 버전: | ActionScript 3.0 |
| 제품 버전: | BlazeDS 4, Adobe Digital Enterprise Platform Data Services for Java EE 3 |
| 런타임 버전: | Flash Player 9, AIR 1.1 |
Sends the specified message to its destination. If the producer is being used for publish/subscribe messaging, only messages of type AsyncMessage should be sent unless a custom message type is being used and the message destination on the server has been configured to process the custom message type.
매개 변수
message:IMessage — The Message to send.
|
오류
InvalidDestinationError — If no destination is set.
|
예제
예제 사용 방법
var producer:Producer = new Producer();
producer.destination = "TestTopic";
var msg:AsyncMessage = new AsyncMessage();
msg.body = "test message";
producer.send(msg);
Tue Jun 12 2018, 03:17 PM Z
상속되는 공용 속성 숨기기
상속되는 공용 속성 표시