|
Lines 1-5
Link Here
|
| 1 |
/********************************************************************** |
1 |
/********************************************************************** |
| 2 |
* Copyright (c) 2005,2006 IBM Corporation and others. |
2 |
* Copyright (c) 2005,2006,2007 IBM Corporation and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
|
Lines 24-29
Link Here
|
| 24 |
import org.eclipse.hyades.logging.core.LoggingAgent; |
24 |
import org.eclipse.hyades.logging.core.LoggingAgent; |
| 25 |
import org.eclipse.hyades.logging.events.cbe.CommonBaseEvent; |
25 |
import org.eclipse.hyades.logging.events.cbe.CommonBaseEvent; |
| 26 |
import org.eclipse.hyades.logging.events.cbe.util.EventFormatter; |
26 |
import org.eclipse.hyades.logging.events.cbe.util.EventFormatter; |
|
|
27 |
import org.eclipse.hyades.logging.adapter.util.Messages; |
| 27 |
import org.w3c.dom.Element; |
28 |
import org.w3c.dom.Element; |
| 28 |
import org.w3c.dom.Node; |
29 |
import org.w3c.dom.Node; |
| 29 |
import org.w3c.dom.NodeList; |
30 |
import org.w3c.dom.NodeList; |
|
Lines 68-76
Link Here
|
| 68 |
private CommonBaseEvent[] processCBEs(CommonBaseEvent[] events) |
69 |
private CommonBaseEvent[] processCBEs(CommonBaseEvent[] events) |
| 69 |
{ |
70 |
{ |
| 70 |
int cbesReturned = 0; |
71 |
int cbesReturned = 0; |
|
|
72 |
// If the Agent Controller is not available then just return because the |
| 73 |
// events cannot be sent to the client. |
| 74 |
if ( !cbelogger.isAgentControllerAvailable()) { |
| 75 |
// log a message |
| 76 |
CommonBaseEvent event = getEventFactory().createCommonBaseEvent(); |
| 77 |
event.getMsgDataElement().setMsgCatalogId("HyadesGA_CBE_Log_Outputter_AgentControllerUnavailable_ERROR_"); |
| 78 |
event.setSeverity(CommonBaseEvent.SEVERITY_CRITICAL); |
| 79 |
log(event); |
| 80 |
return events; |
| 81 |
} |
| 71 |
|
82 |
|
| 72 |
// If the agent is not being monitored then wait for it to be so. Only wait if it is the first time. |
83 |
// If the agent is not being monitored then wait for it to be so. Only wait if it is the first time. |
| 73 |
|
84 |
|
| 74 |
if (firstEvents && events.length > 0 && !cbelogger.isLogging() && waitTime >= 0) { |
85 |
if (firstEvents && events.length > 0 && !cbelogger.isLogging() && waitTime >= 0) { |
| 75 |
|
86 |
|
| 76 |
CommonBaseEvent event = getEventFactory().createCommonBaseEvent(); |
87 |
CommonBaseEvent event = getEventFactory().createCommonBaseEvent(); |
|
Lines 281-286
Link Here
|
| 281 |
} |
292 |
} |
| 282 |
|
293 |
|
| 283 |
firstEvents = true; |
294 |
firstEvents = true; |
|
|
295 |
if (!cbelogger.isAgentControllerAvailable()) { |
| 296 |
// Agent Controller is not available so throw an exception |
| 297 |
throw new AdapterInvalidConfig(Messages.getString("HyadesGA_CBE_Log_Outputter_AgentControllerUnavailable_ERROR_")); |
| 298 |
} |
| 299 |
|
| 284 |
} |
300 |
} |
| 285 |
|
301 |
|
| 286 |
/** |
302 |
/** |