1 // **********************************************************************
3 // Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
5 // This copy of Ice is licensed to you under the terms described in the
6 // ICE_LICENSE file included in this distribution.
8 // **********************************************************************
9 package test
.Ice
.background
;
11 import test
.Ice
.background
.Test
._BackgroundControllerDisp
;
13 class BackgroundControllerI
extends _BackgroundControllerDisp
15 synchronized public void
16 pauseCall(String opName
, Ice
.Current current
)
18 _pausedCalls
.add(opName
);
21 synchronized public void
22 resumeCall(String opName
, Ice
.Current current
)
24 _pausedCalls
.remove(opName
);
28 synchronized public void
29 checkCallPause(Ice
.Current current
)
31 while(_pausedCalls
.contains(current
.operation
))
38 catch(java
.lang
.InterruptedException ex
)
45 holdAdapter(Ice
.Current current
)
51 resumeAdapter(Ice
.Current current
)
57 initializeSocketStatus(int status
, Ice
.Current current
)
59 _configuration
.initializeSocketStatus(status
);
63 initializeException(boolean enable
, Ice
.Current current
)
65 _configuration
.initializeException(enable ?
new Ice
.SocketException() : null);
69 readReady(boolean enable
, Ice
.Current current
)
71 _configuration
.readReady(enable
);
75 readException(boolean enable
, Ice
.Current current
)
77 _configuration
.readException(enable ?
new Ice
.SocketException() : null);
81 writeReady(boolean enable
, Ice
.Current current
)
83 _configuration
.writeReady(enable
);
87 writeException(boolean enable
, Ice
.Current current
)
89 _configuration
.writeException(enable ?
new Ice
.SocketException() : null);
93 BackgroundControllerI(Configuration configuration
, Ice
.ObjectAdapter adapter
)
96 _configuration
= configuration
;
99 final private Ice
.ObjectAdapter _adapter
;
100 final private java
.util
.Set
<String
> _pausedCalls
= new java
.util
.HashSet
<String
>();
101 final private Configuration _configuration
;