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