public class RuleHelper extends org.jboss.byteman.rule.helper.Helper implements SessionManager
| Modifier | Constructor and Description |
|---|---|
protected |
RuleHelper(org.jboss.byteman.rule.Rule rule) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
activate(String uri) |
boolean |
activate(String uri,
String id) |
void |
appendInBuffer(Object obj,
byte[] data,
int offset,
int len,
boolean close)
This method appends data to the buffer associated with the supplied object.
|
void |
appendOutBuffer(Object obj,
byte[] data,
int offset,
int len,
boolean close)
This method appends data to the buffer associated with the supplied object.
|
void |
assertComplete() |
<T> T |
cast(Object obj,
Class<T> clz)
This method casts the supplied object to the nominated
class.
|
BusinessTransactionCollector |
collector()
This method returns the business transaction collector.
|
void |
completeCorrelation(String id) |
void |
correlate(String id) |
ArrayBuilder |
createArrayBuilder()
This method creates a new parameter array builder.
|
InputStream |
createInInputStream(InputStream is)
This method returns an instrumented proxy input stream, to wrap
the supplied output stream, which will record the written data.
|
OutputStream |
createInOutputStream(OutputStream os)
This method returns an instrumented proxy output stream, to wrap
the supplied output stream, which will record the written data.
|
OutputStream |
createInOutputStream(OutputStream os,
String linkId)
This method returns an instrumented proxy output stream, to wrap
the supplied output stream, which will record the written data.
|
InputStream |
createOutInputStream(InputStream is)
This method returns an instrumented proxy input stream, to wrap
the supplied output stream, which will record the written data.
|
OutputStream |
createOutOutputStream(OutputStream os)
This method returns an instrumented proxy output stream, to wrap
the supplied output stream, which will record the written data.
|
OutputStream |
createOutOutputStream(OutputStream os,
String linkId)
This method returns an instrumented proxy output stream, to wrap
the supplied output stream, which will record the written data.
|
String |
createUUID()
This method creates a unique id.
|
String |
faultDescription(Object fault)
This method gets the description of the supplied fault.
|
String |
faultName(Object fault)
This method gets the name of the supplied fault.
|
String |
getBusinessTransactionName()
This method returns the business transaction name.
|
protected FaultDescriptor |
getFaultDescriptor(Object fault)
This method attempts to locate a descriptor for the fault.
|
Map<String,String> |
getHeaders(String type,
Object target)
This method attempts to provide headers for the supplied target
object.
|
protected HeadersAccessor |
getHeadersAccessor(String type)
This method returns the headers accessor for the supplied type.
|
String |
getID(String type,
Object obj)
This method returns an ID associated with the supplied
type and object.
|
String |
getRuleName()
This method returns the name of the instrumentation rule.
|
int |
hashCode(Object obj)
This method returns the hash code for the supplied object.
|
void |
initiateCorrelation(String id) |
void |
initInBuffer(Object obj)
This method initialises a data buffer associated with the supplied object.
|
void |
initOutBuffer(Object obj)
This method initialises a data buffer associated with the supplied object.
|
boolean |
isActive() |
boolean |
isCorrelated(String id) |
boolean |
isInBufferActive(Object obj)
This method determines if there is an active in data buffer for
the supplied object.
|
boolean |
isInContentProcessed()
This method determines if the in content is processed.
|
boolean |
isInProcessed()
This method determines if the in headers or content is processed.
|
boolean |
isInstanceOf(Object obj,
Class<?> clz)
This method determines whether the supplied object is an
instance of the supplied class/interface.
|
boolean |
isOutBufferActive(Object obj)
This method determines if there is an active out data buffer for
the supplied object.
|
boolean |
isOutContentProcessed()
This method determines if the out content is processed.
|
boolean |
isOutProcessed()
This method determines if the out headers or content is processed.
|
void |
recordInBuffer(Object obj)
This method records the data within a buffer associated with the supplied
object.
|
void |
recordOutBuffer(Object obj)
This method records the data within a buffer associated with the supplied
object.
|
void |
releaseNode(String id) |
String |
removeSuffix(String original,
String suffix)
This method removes the supplied suffix (if it exists) in the
supplied 'original' string.
|
void |
retainNode(String id) |
Node |
retrieveNode(String id) |
String |
simpleClassName(Object obj)
This method returns the simple class name of the supplied
object.
|
void |
suppress() |
String |
toString(Object obj)
This method returns the string representation of the
supplied object.
|
void |
unlink() |
activated, addCountDown, callerCheck, callerEquals, callerEquals, callerEquals, callerEquals, callerEquals, callerEquals, callerEquals, callerEquals, callerEquals, callerMatches, callerMatches, callerMatches, callerMatches, callerMatches, callerMatches, callerMatches, callerMatches, callerMatches, clear, closeTrace, countDown, createCountDown, createCounter, createCounter, createJoin, createRendezvous, createRendezvous, createTimer, deactivated, debug, decrementCounter, delay, deleteCounter, deleteRendezvous, deleteTimer, flag, flagged, formatAllStacks, formatAllStacks, formatAllStacks, formatAllStacks, formatStack, formatStack, formatStack, formatStack, formatStackBetween, formatStackBetween, formatStackBetween, formatStackBetween, formatStackBetween, formatStackBetween, formatStackBetweenMatches, formatStackBetweenMatches, formatStackBetweenMatches, formatStackBetweenMatches, formatStackBetweenMatches, formatStackBetweenMatches, formatStackMatching, formatStackMatching, formatStackMatching, formatStackMatching, formatStackMatching, formatStackMatching, formatStackRange, formatThreadStack, formatThreadStack, formatThreadStack, formatThreadStack, getCountDown, getElapsedTimeFromTimer, getObjectSize, getRendezvous, getStack, incrementCounter, incrementCounter, installed, isCountDown, isJoin, isRendezvous, joinEnlist, joinWait, joinWait, killJVM, killJVM, killThread, matchIndex, openTrace, openTrace, printFrame, printlnFrame, readCounter, readCounter, rendezvous, rendezvous, resetTimer, setTriggering, signalKill, signalKill, signalThrow, signalThrow, signalWake, signalWake, toString, trace, trace, traceAllStacks, traceAllStacks, traceAllStacks, traceAllStacks, traceAllStacks, traceAllStacks, traceClose, traceln, traceln, traceOpen, traceOpen, traceStack, traceStack, traceStack, traceStack, traceStack, traceStack, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetween, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackBetweenMatches, traceStackMatching, traceStackMatching, traceStackMatching, traceStackMatching, traceStackMatching, traceStackMatching, traceStackMatching, traceStackMatching, traceStackMatching, traceStackRange, traceThreadStack, traceThreadStack, traceThreadStack, traceThreadStack, traceThreadStack, traceThreadStack, triggerIndex, uninstalled, waitFor, waitFor, waitingprotected RuleHelper(org.jboss.byteman.rule.Rule rule)
rule - public String getRuleName()
public BusinessTransactionCollector collector()
public String createUUID()
public String getID(String type, Object obj)
type - The type represents the use (or context) of the objectobj - The objectpublic boolean isInstanceOf(Object obj, Class<?> clz)
obj - The objectclz - The classpublic <T> T cast(Object obj, Class<T> clz)
obj - The objectclz - The class to cast topublic String simpleClassName(Object obj)
obj - The objectpublic String toString(Object obj)
obj - The objectpublic int hashCode(Object obj)
obj - The objectprotected FaultDescriptor getFaultDescriptor(Object fault)
fault - The faultpublic String faultName(Object fault)
fault - The faultpublic String faultDescription(Object fault)
fault - The faultpublic String removeSuffix(String original, String suffix)
original - The original stringsuffix - The suffix to removepublic ArrayBuilder createArrayBuilder()
public Map<String,String> getHeaders(String type, Object target)
type - The target typetarget - The target instanceprotected HeadersAccessor getHeadersAccessor(String type)
type - The typepublic boolean activate(String uri, String id)
activate in interface SessionManagerpublic boolean activate(String uri)
activate in interface SessionManagerpublic boolean isActive()
isActive in interface SessionManagerpublic void retainNode(String id)
retainNode in interface SessionManagerpublic void releaseNode(String id)
releaseNode in interface SessionManagerpublic Node retrieveNode(String id)
retrieveNode in interface SessionManagerpublic void initiateCorrelation(String id)
initiateCorrelation in interface SessionManagerpublic boolean isCorrelated(String id)
isCorrelated in interface SessionManagerpublic void correlate(String id)
correlate in interface SessionManagerpublic void completeCorrelation(String id)
completeCorrelation in interface SessionManagerpublic void unlink()
unlink in interface SessionManagerpublic void suppress()
suppress in interface SessionManagerpublic void assertComplete()
assertComplete in interface SessionManagerpublic String getBusinessTransactionName()
public void initInBuffer(Object obj)
obj - The object associated with the bufferpublic boolean isInBufferActive(Object obj)
obj - The object associated with the bufferpublic void appendInBuffer(Object obj, byte[] data, int offset, int len, boolean close)
obj - The object associated with the bufferdata - The data to be appendedoffset - The offset of the datalen - The length of dataclose - Whether to close the buffer after appending the datapublic void recordInBuffer(Object obj)
obj - The object associated with the bufferpublic void initOutBuffer(Object obj)
obj - The object associated with the bufferpublic boolean isOutBufferActive(Object obj)
obj - The object associated with the bufferpublic void appendOutBuffer(Object obj, byte[] data, int offset, int len, boolean close)
obj - The object associated with the bufferdata - The data to be appendedoffset - The offset of the datalen - The length of dataclose - Whether to close the buffer after appending the datapublic void recordOutBuffer(Object obj)
obj - The object associated with the bufferpublic boolean isInProcessed()
public boolean isInContentProcessed()
public boolean isOutProcessed()
public boolean isOutContentProcessed()
public OutputStream createInOutputStream(OutputStream os)
os - The original output streampublic OutputStream createInOutputStream(OutputStream os, String linkId)
os - The original output streamlinkId - The optional link idpublic OutputStream createOutOutputStream(OutputStream os)
os - The original output streampublic OutputStream createOutOutputStream(OutputStream os, String linkId)
os - The original output streamlinkId - The optional link idpublic InputStream createInInputStream(InputStream is)
is - The original input streampublic InputStream createOutInputStream(InputStream is)
is - The original input streamCopyright © 2015 Red Hat, Inc.. All rights reserved.