當前位置: 首頁>>代碼示例>>Java>>正文


Java OnEvent類代碼示例

本文整理匯總了Java中io.advantageous.qbit.annotation.OnEvent的典型用法代碼示例。如果您正苦於以下問題:Java OnEvent類的具體用法?Java OnEvent怎麽用?Java OnEvent使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


OnEvent類屬於io.advantageous.qbit.annotation包,在下文中一共展示了OnEvent類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: newTodo

import io.advantageous.qbit.annotation.OnEvent; //導入依賴的package包/類
@OnEvent(JmsUtil.TODO_QUEUE)
public void newTodo(final Todo todo) {
    blockingQueue.add(todo);
}
 
開發者ID:advantageous,項目名稱:qbit-extensions,代碼行數:5,代碼來源:JmsConsumerUsingEventBus.java

示例2: listen

import io.advantageous.qbit.annotation.OnEvent; //導入依賴的package包/類
@OnEvent("rick")
private void listen(String message) {
    //puts(message);
    callCount++;
}
 
開發者ID:advantageous,項目名稱:qbit,代碼行數:6,代碼來源:BoonEventManagerTest.java

示例3: enroll

import io.advantageous.qbit.annotation.OnEvent; //導入依賴的package包/類
@OnEvent(NEW_HIRE_CHANNEL)
public void enroll(final Employee employee) {

    System.out.printf("Employee enrolled into benefits system employee %s %d\n",
            employee.getFirstName(), employee.getEmployeeId());

}
 
開發者ID:advantageous,項目名稱:qbit-extensions,代碼行數:8,代碼來源:UsingShutDown.java

示例4: invite

import io.advantageous.qbit.annotation.OnEvent; //導入依賴的package包/類
@OnEvent(NEW_HIRE_CHANNEL)
public void invite(final Employee employee) {

    System.out.printf("Employee will be invited to the community outreach program %s %d\n",
            employee.getFirstName(), employee.getEmployeeId());

}
 
開發者ID:advantageous,項目名稱:qbit-extensions,代碼行數:8,代碼來源:UsingShutDown.java

示例5: addEmployeeToPayroll

import io.advantageous.qbit.annotation.OnEvent; //導入依賴的package包/類
@OnEvent(PAYROLL_ADJUSTMENT_CHANNEL)
public void addEmployeeToPayroll(final Employee employee, int salary) {

    System.out.printf("Employee added to payroll  %s %d %d\n",
            employee.getFirstName(), employee.getEmployeeId(), salary);

}
 
開發者ID:advantageous,項目名稱:qbit-extensions,代碼行數:8,代碼來源:UsingShutDown.java

示例6: onSomethingHappened

import io.advantageous.qbit.annotation.OnEvent; //導入依賴的package包/類
@OnEvent("FOO.bam")
public void onSomethingHappened(int i, String foo) {

    eventCount.incrementAndGet();

    System.out.println("MyServiceEventReceiver2 bar2" + i + " foo " + foo);

}
 
開發者ID:advantageous,項目名稱:qbit,代碼行數:9,代碼來源:BoonEventChannelTestAndOnEvent.java


注:本文中的io.advantageous.qbit.annotation.OnEvent類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。