public class MHawkSink extends MSink
MHawkSink
allows applications to send trace messages directly to TIBCO Hawk.
To see the notification on a Hawk display, you need to write a Hawk rule
invoking the _onUnsolicited()
method of the microagent.
See TIBCO Hawk documentation for details.
m_registry
Constructor and Description |
---|
MHawkSink(MComponentRegistry registry,
java.lang.String sinkName,
MHawkMicroAgent hma)
This form of the constructor creates an
MHawkSink passing in a microagent as a parameter. |
MHawkSink(MComponentRegistry registry,
java.lang.String sinkName,
java.lang.String hmaName)
This form of the constructor creates an
MHawkSink specifying a microagent by name. |
Modifier and Type | Method and Description |
---|---|
MHawkMicroAgent |
getHawkMicroAgent()
Return the microagent that was associated with this sink in the
constructor or in the adapter instance description object.
|
java.lang.String |
toString() |
void |
write(java.lang.String msg,
boolean flush)
send the specified msg, if not null, to Hawk as an unsolicited msg
|
void |
write(java.lang.String msgPrefix,
MTree tree,
boolean flush)
Serialize the specified MTree object to this sink
|
void |
write(java.lang.String msgPrefix,
MTree tree,
java.lang.String p_role,
boolean flush) |
void |
write(java.lang.String msg,
java.lang.String p_role,
boolean flush) |
closeSink, flushSink, write, write, write, write
activate, deactivate, getComponentRegistry, getName, getStatus, isActivated, remove
public MHawkSink(MComponentRegistry registry, java.lang.String sinkName, MHawkMicroAgent hma)
MHawkSink
passing in a microagent as a parameter.registry
- Component registry in which this file sink is being created. Use
app.getComponentRegistry()
to retrieve the component registry for an application.sinkName
- Sink name associated with this instance of the class. The sink
name has no relationship with the role of the sink. The role is defined when
the sink and a trace are matched.hma
- Microagent that should receive the traces routed to this sink.public MHawkSink(MComponentRegistry registry, java.lang.String sinkName, java.lang.String hmaName)
MHawkSink
specifying a microagent by name.registry
- Component registry in which this file sink is being created. Use
app.getComponentRegistry()
to retrieve the component registry for an application.sinkName
- Sink name associated with this instance of the class. The sink
name has no relationship with the role of the sink. The role is defined when
the sink and a trace are matched.hmaName
- Name of the microagent that should receive the traces routed
to this sink. The two microagents introduced by the SDK are called
COM.TIBCO.ADAPTER
and COM.TIBCO.ADAPTER.appname
,
where appname is the name of the application. For additional microagent names,
see the TIBCO Hawk documentation.public MHawkMicroAgent getHawkMicroAgent()
MHawkMicroAgent
public void write(java.lang.String msg, boolean flush)
public void write(java.lang.String msg, java.lang.String p_role, boolean flush)
public void write(java.lang.String msgPrefix, MTree tree, boolean flush)
public void write(java.lang.String msgPrefix, MTree tree, java.lang.String p_role, boolean flush)