Subversion Repository Public Repository

litesoft

Diff Revisions 948 vs 950 for /trunk/Java/GWT/OldClient/src/org/litesoft/GWT/eventbus/client/nonpublic/NullStatePeerSupportingEventBus.java

Diff revisions: vs.
  @@ -1,90 +1,90 @@
1 - // This Source Code is in the Public Domain per: http://unlicense.org
2 - package org.litesoft.GWT.eventbus.client.nonpublic;
3 -
4 - import org.litesoft.GWT.eventbus.client.*;
5 - import org.litesoft.logger.*;
6 -
7 - public class NullStatePeerSupportingEventBus implements IStatePeerSupportingEventBus {
8 - private static final Logger LOGGER = LoggerFactory.getLogger( NullStatePeerSupportingEventBus.class );
9 -
10 - public static final IStatePeerSupportingEventBus INSTANCE = new NullStatePeerSupportingEventBus();
11 -
12 - private static final String DISPOSED = "Disposed ";
13 -
14 - private NullStatePeerSupportingEventBus() {
15 - }
16 -
17 - public void disposing() {
18 - }
19 -
20 - public void dispose() {
21 - }
22 -
23 - public void subscribeAndPublish( EventSubscriptionStructure[] pSubscriptions, EventPackage[] pPackages ) {
24 - for ( int i = 0; i < pSubscriptions.length; i++ ) {
25 - EventSubscriptionStructure subscription = pSubscriptions[i];
26 - if ( subscription != null ) {
27 - LLsubscribe( subscription.getSubscribeWith() );
28 - }
29 - }
30 - for ( int i = 0; i < pPackages.length; i++ ) {
31 - EventPackage eventPackage = pPackages[i];
32 - if ( eventPackage != null ) {
33 - LLpublish( eventPackage );
34 - }
35 - }
36 - }
37 -
38 - public void publishExpectingResponse( EventPackage pPackage ) {
39 - LLpublish( pPackage );
40 - }
41 -
42 - public void unsubscribe( EventSubscriptionStructure[] pSubscriptions ) {
43 - for ( int i = 0; i < pSubscriptions.length; i++ ) {
44 - EventSubscriptionStructure subscription = pSubscriptions[i];
45 - if ( subscription != null ) {
46 - LLunsubscribe( subscription.getSubscribeWith() );
47 - }
48 - }
49 - }
50 -
51 - public void problemFromRemotePeerService( EventPackage pProblem ) {
52 - LOGGER.warn.log( DISPOSED, "problemFromRemotePeerService", pProblem );
53 - }
54 -
55 - public boolean propagateFromRemotePeerService( ChannelServicePackage pFromPeer ) {
56 - LOGGER.warn.log( DISPOSED, "propagateFromRemotePeerService", pFromPeer );
57 - return false;
58 - }
59 -
60 - public boolean ping() {
61 - LOGGER.warn.log( DISPOSED, "ping" );
62 - return false;
63 - }
64 -
65 - public IStatePeerSupportingEventBus suspendedToRegular( EventConstrictor pEventConstrictor,
66 - EventBus pEventBus ) {
67 - throw new IllegalStateException( "Not Suspended" );
68 - }
69 -
70 - public boolean releaseCollected() {
71 - LOGGER.warn.log( DISPOSED, "releaseCollected" );
72 - return false;
73 - }
74 -
75 - private void LLpublish( EventPackage pPackage ) {
76 - LOGGER.warn.log( DISPOSED, "publish", pPackage );
77 - }
78 -
79 - private void LLsubscribe( String pEventName ) {
80 - LOGGER.warn.log( DISPOSED, "subscribe", pEventName );
81 - }
82 -
83 - private void LLunsubscribe( String pEventName ) {
84 - LOGGER.warn.log( DISPOSED, "unsubscribe", pEventName );
85 - }
86 -
87 - public String toString() {
88 - return DISPOSED;
89 - }
90 - }
1 + // This Source Code is in the Public Domain per: http://unlicense.org
2 + package org.litesoft.GWT.eventbus.client.nonpublic;
3 +
4 + import org.litesoft.GWT.eventbus.client.*;
5 + import org.litesoft.logger.*;
6 +
7 + public class NullStatePeerSupportingEventBus implements IStatePeerSupportingEventBus {
8 + private static final Logger LOGGER = LoggerFactory.getLogger( NullStatePeerSupportingEventBus.class );
9 +
10 + public static final IStatePeerSupportingEventBus INSTANCE = new NullStatePeerSupportingEventBus();
11 +
12 + private static final String DISPOSED = "Disposed ";
13 +
14 + private NullStatePeerSupportingEventBus() {
15 + }
16 +
17 + public void disposing() {
18 + }
19 +
20 + public void dispose() {
21 + }
22 +
23 + public void subscribeAndPublish( EventSubscriptionStructure[] pSubscriptions, EventPackage[] pPackages ) {
24 + for ( int i = 0; i < pSubscriptions.length; i++ ) {
25 + EventSubscriptionStructure subscription = pSubscriptions[i];
26 + if ( subscription != null ) {
27 + LLsubscribe( subscription.getSubscribeWith() );
28 + }
29 + }
30 + for ( int i = 0; i < pPackages.length; i++ ) {
31 + EventPackage eventPackage = pPackages[i];
32 + if ( eventPackage != null ) {
33 + LLpublish( eventPackage );
34 + }
35 + }
36 + }
37 +
38 + public void publishExpectingResponse( EventPackage pPackage ) {
39 + LLpublish( pPackage );
40 + }
41 +
42 + public void unsubscribe( EventSubscriptionStructure[] pSubscriptions ) {
43 + for ( int i = 0; i < pSubscriptions.length; i++ ) {
44 + EventSubscriptionStructure subscription = pSubscriptions[i];
45 + if ( subscription != null ) {
46 + LLunsubscribe( subscription.getSubscribeWith() );
47 + }
48 + }
49 + }
50 +
51 + public void problemFromRemotePeerService( EventPackage pProblem ) {
52 + LOGGER.warn.log( DISPOSED, "problemFromRemotePeerService", pProblem );
53 + }
54 +
55 + public boolean propagateFromRemotePeerService( ChannelServicePackage pFromPeer ) {
56 + LOGGER.warn.log( DISPOSED, "propagateFromRemotePeerService", pFromPeer );
57 + return false;
58 + }
59 +
60 + public boolean ping() {
61 + LOGGER.warn.log( DISPOSED, "ping" );
62 + return false;
63 + }
64 +
65 + public IStatePeerSupportingEventBus suspendedToRegular( EventConstrictor pEventConstrictor,
66 + EventBus pEventBus ) {
67 + throw new IllegalStateException( "Not Suspended" );
68 + }
69 +
70 + public boolean releaseCollected() {
71 + LOGGER.warn.log( DISPOSED, "releaseCollected" );
72 + return false;
73 + }
74 +
75 + private void LLpublish( EventPackage pPackage ) {
76 + LOGGER.warn.log( DISPOSED, "publish", pPackage );
77 + }
78 +
79 + private void LLsubscribe( String pEventName ) {
80 + LOGGER.warn.log( DISPOSED, "subscribe", pEventName );
81 + }
82 +
83 + private void LLunsubscribe( String pEventName ) {
84 + LOGGER.warn.log( DISPOSED, "unsubscribe", pEventName );
85 + }
86 +
87 + public String toString() {
88 + return DISPOSED;
89 + }
90 + }