本文整理了Java中javax.enterprise.event.Event.select()
方法的一些代码示例,展示了Event.select()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.select()
方法的具体详情如下:
包路径:javax.enterprise.event.Event
类名称:Event
方法名:select
[英]Obtains a child Event for the given required type and additional required qualifiers.
[中]获取给定必需类型和其他必需限定符的子事件。
代码示例来源:origin: 4thline/cling
@Override
public void remoteDeviceDiscoveryStarted(Registry registry, RemoteDevice device) {
remoteDeviceDiscoveryEvent.select(Phase.ALIVE).fire(
new RemoteDeviceDiscovery(device)
);
}
代码示例来源:origin: 4thline/cling
@Override
public void localDeviceAdded(Registry registry, LocalDevice device) {
localDeviceDiscoveryEvent.select(Phase.COMPLETE).fire(
new LocalDeviceDiscovery(device)
);
}
代码示例来源:origin: 4thline/cling
@Override
public void beforeShutdown(Registry registry) {
registryShutdownEvent.select(new AnnotationLiteral<Before>() {
}).fire(
new RegistryShutdown()
);
}
代码示例来源:origin: 4thline/cling
@Override
public void afterShutdown() {
registryShutdownEvent.select(new AnnotationLiteral<After>() {
}).fire(
new RegistryShutdown()
);
}
}
代码示例来源:origin: 4thline/cling
@Override
public void localDeviceRemoved(Registry registry, LocalDevice device) {
localDeviceDiscoveryEvent.select(Phase.BYEBYE).fire(
new LocalDeviceDiscovery(device)
);
}
代码示例来源:origin: 4thline/cling
@Override
public void remoteDeviceRemoved(Registry registry, RemoteDevice device) {
remoteDeviceDiscoveryEvent.select(Phase.BYEBYE).fire(
new RemoteDeviceDiscovery(device)
);
}
代码示例来源:origin: 4thline/cling
@Override
public void remoteDeviceAdded(Registry registry, RemoteDevice device) {
remoteDeviceDiscoveryEvent.select(Phase.COMPLETE).fire(
new RemoteDeviceDiscovery(device)
);
}
代码示例来源:origin: 4thline/cling
@Override
public void remoteDeviceUpdated(Registry registry, RemoteDevice device) {
remoteDeviceDiscoveryEvent.select(Phase.UPDATED).fire(
new RemoteDeviceDiscovery(device)
);
}
代码示例来源:origin: kingthy/TVRemoteIME
@Override
public void remoteDeviceDiscoveryStarted(Registry registry, RemoteDevice device) {
remoteDeviceDiscoveryEvent.select(Phase.ALIVE).fire(
new RemoteDeviceDiscovery(device)
);
}
代码示例来源:origin: kingthy/TVRemoteIME
@Override
public void remoteDeviceAdded(Registry registry, RemoteDevice device) {
remoteDeviceDiscoveryEvent.select(Phase.COMPLETE).fire(
new RemoteDeviceDiscovery(device)
);
}
代码示例来源:origin: kingthy/TVRemoteIME
@Override
public void localDeviceAdded(Registry registry, LocalDevice device) {
localDeviceDiscoveryEvent.select(Phase.COMPLETE).fire(
new LocalDeviceDiscovery(device)
);
}
代码示例来源:origin: kingthy/TVRemoteIME
@Override
public void localDeviceRemoved(Registry registry, LocalDevice device) {
localDeviceDiscoveryEvent.select(Phase.BYEBYE).fire(
new LocalDeviceDiscovery(device)
);
}
代码示例来源:origin: kingthy/TVRemoteIME
@Override
public void remoteDeviceUpdated(Registry registry, RemoteDevice device) {
remoteDeviceDiscoveryEvent.select(Phase.UPDATED).fire(
new RemoteDeviceDiscovery(device)
);
}
代码示例来源:origin: kingthy/TVRemoteIME
@Override
public void remoteDeviceRemoved(Registry registry, RemoteDevice device) {
remoteDeviceDiscoveryEvent.select(Phase.BYEBYE).fire(
new RemoteDeviceDiscovery(device)
);
}
代码示例来源:origin: kingthy/TVRemoteIME
@Override
public void beforeShutdown(Registry registry) {
registryShutdownEvent.select(new AnnotationLiteral<Before>() {
}).fire(
new RegistryShutdown()
);
}
代码示例来源:origin: kingthy/TVRemoteIME
@Override
public void afterShutdown() {
registryShutdownEvent.select(new AnnotationLiteral<After>() {
}).fire(
new RegistryShutdown()
);
}
}
代码示例来源:origin: org.jboss.jsr299.tck/jsr299-tck-impl
public void restoreItem(Item item)
{
if (items.contains(item))
{
throw new IllegalArgumentException("Item already restored");
}
itemEvent.select(new AnnotationLiteral<Restored>() {}).fire(item);
}
代码示例来源:origin: org.apache.myfaces.extensions.cdi.bundles/myfaces-extcdi-bundle-jsf20
public void broadcastAfterEvent(PhaseEvent phaseEvent)
{
this.phaseEvent.select(createAnnotationLiteral(phaseEvent.getPhaseId(), false)).fire(phaseEvent);
this.afterAnyPhaseEvent.fire(phaseEvent);
}
代码示例来源:origin: org.jboss.jsr299.tck/jsr299-tck-impl
@Test(groups = "events", expectedExceptions = IllegalArgumentException.class)
@SpecAssertion(section = "10.3.1", id = "eba")
public void testEventSelectThrowsExceptionForDuplicateBindingType()
{
SecuritySensor sensor = getInstanceByType(SecuritySensor.class);
sensor.securityEvent.select(new AnnotationLiteral<SystemTest>() {}, new AnnotationLiteral<SystemTest>() {});
}
代码示例来源:origin: org.jboss.jsr299.tck/jsr299-tck-impl
@Test(groups = "events", expectedExceptions = IllegalArgumentException.class)
@SpecAssertion(section = "10.3.1", id = "ec")
public void testEventSelectWithSubtypeThrowsExceptionIfAnnotationIsNotBindingType()
{
SecuritySensor sensor = getInstanceByType(SecuritySensor.class);
sensor.securityEvent.select(BreakInEvent.class, new AnnotationLiteral<NotABindingType>() {});
}
}
内容来源于网络,如有侵权,请联系作者删除!