139 |
} |
} |
140 |
} |
} |
141 |
} |
} |
142 |
|
|
143 |
|
|
144 |
|
/** |
145 |
|
* This task sets the LSCP client's read timeout. |
146 |
|
*/ |
147 |
|
public static class SetClientReadTimeout extends EnhancedTask { |
148 |
|
private int timeout; |
149 |
|
|
150 |
|
/** |
151 |
|
* Creates new instance of <code>SetClientReadTimeout</code>. |
152 |
|
* @param timeout The new timeout value (in seconds). |
153 |
|
*/ |
154 |
|
public |
155 |
|
SetClientReadTimeout(int timeout) { |
156 |
|
setTitle("Global.SetClientReadTimeout_task"); |
157 |
|
setDescription(i18n.getMessage("Global.SetClientReadTimeout.desc")); |
158 |
|
this.timeout = timeout; |
159 |
|
} |
160 |
|
|
161 |
|
/** The entry point of the task. */ |
162 |
|
public void |
163 |
|
run() { |
164 |
|
try { |
165 |
|
CC.getClient().setSoTimeout(timeout * 1000); |
166 |
|
} catch(Exception x) { |
167 |
|
setErrorMessage(getDescription() + ": " + HF.getErrorMessage(x)); |
168 |
|
CC.getLogger().log(Level.FINE, getErrorMessage(), x); |
169 |
|
} |
170 |
|
} |
171 |
|
} |
172 |
|
|
173 |
/** |
/** |
174 |
* This task gets the list of instruments in the specified instrument file. |
* This task gets the list of instruments in the specified instrument file. |