litesoft
@ 947
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
// This Source Code is in the Public Domain per: http://unlicense.org package org.litesoft.GWT.eventbus.server; import org.litesoft.GWT.eventbus.client.*; import org.litesoft.delayed.*; /** * A simple, non-distributed Server implementation of an event bus. */ public class SimpleServerEventBus extends AbstractSimpleEventBus implements IServerEventBus { public Type getType() { return Type.Simple; } public SimpleServerEventBus() { super( TimedRunnableManager.INSTANCE, LoggingUnexpectedEventPackageHandler.INSTANCE ); } public void apply( ServerEventBusSubscriptionCollector pCollector ) { if ( pCollector != null ) { for ( ServerEventBusDisposeListener zListener : pCollector.getListeners() ) { addListener( zListener ); } subscribe( pCollector ); } } public void addListener( ServerEventBusDisposeListener pServerEventBusDisposeListener ) { throw noListenerSupport(); } public void removeListener( ServerEventBusDisposeListener pServerEventBusDisposeListener ) { throw noListenerSupport(); } public ServerEventBusDisposeListener[] getServerEventBusDisposeListeners() { throw noListenerSupport(); } private UnsupportedOperationException noListenerSupport() { return new UnsupportedOperationException( "ServerEventBusDisposeListener(s) not supported on SimpleServerEventBus" ); } } |