Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Huawei H14-231_V1.0 Exam - Topic 2 Question 56 Discussion

When a developer subscribes to a public event, he processes the public event in the onReceiveEvent() callback function and writes the following code.EventRunner runner = EventRunner.create();MyEventHandler myHandler = newMyEventHandler(rurner);@Overridepublic void onReceiveEvent(CommonEventDatacommonEventData){final AsyncCommonEventResultresult=goAsyncCommonEvent Runnable task = newRunnable(){@overridepub1ic void run {......The action to be performed, defined by the developerresult.finishCommonEvent();}};myHandler.postTask(task);}
B) implements asynchronous operations, which solves the problem that time-consuming operations cannot be performed on onReceiveEvent
A) Gives subscribers permissions
C) sets the priority of ordered public events
D) The publisher has the permission to publish sticky public events

Huawei H14-231_V1.0 Exam - Topic 2 Question 56 Discussion

Actual exam question for Huawei's H14-231_V1.0 exam
Question #: 56
Topic #: 2
[All H14-231_V1.0 Questions]

When a developer subscribes to a public event, he processes the public event in the onReceiveEvent() callback function and writes the following code.

EventRunner runner = EventRunner.create();

MyEventHandler myHandler = new

MyEventHandler(rurner);

@Override

public void onReceiveEvent(CommonEventData

commonEventData){

final AsyncCommonEventResult

result=goAsyncCommonEvent Runnable task = new

Runnable(){

@override

pub1ic void run {

......

The action to be performed, defined by the developer

result.finishCommonEvent();

}

};

myHandler.postTask(task);

}

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

0/2000 characters

Currently there are no comments in this discussion, be the first to comment!


Save Cancel