
public class DefaultMessageProcessor extends Object implements IMessageProcessor
IMessageProcessor,
ConfigLoader| Constructor and Description |
|---|
DefaultMessageProcessor() |
| Modifier and Type | Method and Description |
|---|---|
void |
abort()
purges all queues and maps
|
void |
clearTransactionThreadId(long ThreadId) |
protected boolean |
containsSLAXpathOrUserIdentXpath(TransactionalWebServicePolicy pol)
used to determine if we need to save the request or response
|
protected boolean |
doesSLAContainXpath(SLA get)
used to determine if we need to record the request/response pair
|
protected boolean |
doesSLARuleContainXpath(RuleBaseType rule)
recursive used to determine if we need to record the request/response
pair
|
void |
forceNewDataPusherThread()
Use with caution.
|
ConfigLoader |
getConfig() |
String |
getHostName()
returns the lowercase value of the current hostname
|
Set<String> |
getIgnoreList()
list of soap actions that should be ignored by agents
|
String |
getLastErrorMessage() |
int |
getPolicyCache()
gets the size of the current policy cache
|
TransactionalWebServicePolicy |
getPolicyIfAvailable(String url)
Attempts to find and return a service policy from the local cache.
|
int |
getThreadMapSize() |
long |
getTotalmessagesprocessed() |
String |
getTransactionThreadId(Long ThreadId)
Dependency Detection This should only be called in the context of a
client handler seeing outbound transactions
|
Map<String,String> |
getURLaddressMap() |
ArrayList<String> |
getUserIdentities(TransactionalWebServicePolicy p,
MessageCorrelator mc)
turns all user identities as defined by the service policy, plus ip
addresses
|
ArrayList<String> |
getUsersfromXpath(ArrayOfXPathExpressionType xpaths,
String message)
returns user identities via xpath
|
void |
incMessagesProcessed(int size) |
int |
internalMessageMapSize()
gets the size of the current message map
|
protected String |
ipWrapAndCacher(String URL)
IP to DNS mappings to speed up performance non blocking
|
boolean |
isDependencyInjectionEnabled() |
int |
outboundQueueSize()
gets the size of the current queue
|
void |
processMessageInput(String XMLrequest,
int requestSize,
String url,
String soapAction,
String HttpUsername,
String HashCode,
HashMap headers,
String ipaddress,
String agentclassname,
String relatedtransaction,
String threadid)
caches stored data and adds it to the message map.
|
void |
processMessageOutput(String HashCode,
String responseXML,
int responseSize,
boolean isFault,
Long dod,
HashMap headers)
pairs up a response with a request and adds it to the queue for
transmission
|
void |
processMessageOutput(String HashCode,
String responseXML,
int responseSize,
boolean isFault,
Long dod,
HashMap headers,
String relatedTransaction)
wrapper to the main function This is normally only called when a CLIENT
receives a response from a service
|
void |
processPreppedMessage(AddDataRequestMsg request)
this assumes that the request is already prepopulated with all required
information according the policy for this item typically used for the
offline persistent storage agent.
|
void |
purgeMessageMap()
purges the map
|
void |
purgeOutboundQueue()
purges the queue
|
void |
purgePolicyCache()
purges the policy cache
|
void |
purgeThreadMap() |
void |
removeDeadMessage()
Any message in the Message Map older than the dead message interval will
be removed from the Message Map, flagged as faulted and added to the
outbound queue
|
void |
removeFromQueue(String id)
Use when for some reason, a transaction cannot be monitored NOTE, removes
from the Message Map, not the outbound queue
|
void |
removeFromQueue(UUID id)
Use when for some reason, a transaction cannot be monitored NOTE, removes
from the Message Map, not the outbound queue
|
void |
setLastErrorMessage(String msg) |
void |
setRunning(boolean b) |
void |
setTransactionThreadId(Long ThreadId,
String id)
* Dependency Detection Only Set on an inbound service request
|
boolean |
shouldAgentRecordRequestContent(String requesturl)
performance optimzation to be used by agents that determines if the
request body should be it uses a lazy algorithm for resolving request
urls to modified urls and will always resort to being on the safe side
|
boolean |
shouldAgentRecordResponseContent(String requesturl)
performance optimization to be used by agents
|
void |
terminate() |
public int getThreadMapSize()
getThreadMapSize in interface IMessageProcessorpublic void purgeThreadMap()
purgeThreadMap in interface IMessageProcessorpublic void abort()
IMessageProcessorabort in interface IMessageProcessorprotected String ipWrapAndCacher(String URL)
URL - public void clearTransactionThreadId(long ThreadId)
clearTransactionThreadId in interface IMessageProcessorpublic void forceNewDataPusherThread()
IMessageProcessorforceNewDataPusherThread in interface IMessageProcessorpublic ConfigLoader getConfig()
getConfig in interface IMessageProcessorpublic String getHostName()
IMessageProcessorgetHostName in interface IMessageProcessorpublic String getLastErrorMessage()
getLastErrorMessage in interface IMessageProcessorpublic int getPolicyCache()
IMessageProcessorgetPolicyCache in interface IMessageProcessorpublic TransactionalWebServicePolicy getPolicyIfAvailable(String url)
IMessageProcessorgetPolicyIfAvailable in interface IMessageProcessorpublic long getTotalmessagesprocessed()
getTotalmessagesprocessed in interface IMessageProcessorpublic String getTransactionThreadId(Long ThreadId)
IMessageProcessorgetTransactionThreadId in interface IMessageProcessorpublic ArrayList<String> getUserIdentities(TransactionalWebServicePolicy p, MessageCorrelator mc)
IMessageProcessorgetUserIdentities in interface IMessageProcessorp - policypublic ArrayList<String> getUsersfromXpath(ArrayOfXPathExpressionType xpaths, String message)
IMessageProcessorgetUsersfromXpath in interface IMessageProcessorpublic void incMessagesProcessed(int size)
incMessagesProcessed in interface IMessageProcessorpublic int internalMessageMapSize()
IMessageProcessorinternalMessageMapSize in interface IMessageProcessorpublic int outboundQueueSize()
IMessageProcessoroutboundQueueSize in interface IMessageProcessorpublic void processMessageInput(String XMLrequest, int requestSize, String url, String soapAction, String HttpUsername, String HashCode, HashMap headers, String ipaddress, String agentclassname, String relatedtransaction, String threadid)
IMessageProcessorprocessMessageInput in interface IMessageProcessorXMLrequest - - may be null, the request contentrequestSize - - size of the payloadurl - - the requested URL that the client asked for
http://localhost/pathsoapAction - - SOAPAction or HTTP MethodHttpUsername - the username or DN of the requestorHashCode - - very important, a unique identifier for this message.
Use UUID.randomheaders - - Transport layer headers of the requestipaddress - - IP of the requestoragentclassname - - the class of the agent that recorded the message.
MUST CONTAIN "client" IF THIS IS A CLIENT or from a proxy TRANSACTION!!
this is necessary for proper URL resolutionrelatedtransaction - - if this transaction was also recorded
elsewhere, pull this data from the http headersthreadid - - if this transaction was also recorded elsewhere, pull
this data from the http headers. or generate a new one if it was not
present using UUID.randompublic void processMessageOutput(String HashCode, String responseXML, int responseSize, boolean isFault, Long dod, HashMap headers, String relatedTransaction)
IMessageProcessorprocessMessageOutput in interface IMessageProcessorpublic void processMessageOutput(String HashCode, String responseXML, int responseSize, boolean isFault, Long dod, HashMap headers)
IMessageProcessorprocessMessageOutput in interface IMessageProcessorHashCode - the UUID of the message that links this response to the
requestresponseXML - response payloaddod - time of death, no longer usedpublic void processPreppedMessage(AddDataRequestMsg request)
IMessageProcessorprocessPreppedMessage in interface IMessageProcessorpublic void purgeMessageMap()
IMessageProcessorpurgeMessageMap in interface IMessageProcessorpublic void purgeOutboundQueue()
IMessageProcessorpurgeOutboundQueue in interface IMessageProcessorpublic void purgePolicyCache()
IMessageProcessorpurgePolicyCache in interface IMessageProcessorpublic void removeDeadMessage()
IMessageProcessorremoveDeadMessage in interface IMessageProcessorpublic void removeFromQueue(UUID id)
IMessageProcessorremoveFromQueue in interface IMessageProcessorpublic void removeFromQueue(String id)
IMessageProcessorremoveFromQueue in interface IMessageProcessorpublic void setRunning(boolean b)
setRunning in interface IMessageProcessorpublic void setTransactionThreadId(Long ThreadId, String id) throws Exception
IMessageProcessorsetTransactionThreadId in interface IMessageProcessorExceptionpublic boolean shouldAgentRecordRequestContent(String requesturl)
IMessageProcessorshouldAgentRecordRequestContent in interface IMessageProcessorprotected boolean doesSLAContainXpath(SLA get)
get - protected boolean doesSLARuleContainXpath(RuleBaseType rule)
rule - protected boolean containsSLAXpathOrUserIdentXpath(TransactionalWebServicePolicy pol)
pol - public boolean shouldAgentRecordResponseContent(String requesturl)
IMessageProcessorshouldAgentRecordResponseContent in interface IMessageProcessorpublic void terminate()
terminate in interface IMessageProcessorpublic Set<String> getIgnoreList()
IMessageProcessorgetIgnoreList in interface IMessageProcessorpublic Map<String,String> getURLaddressMap()
getURLaddressMap in interface IMessageProcessorpublic boolean isDependencyInjectionEnabled()
isDependencyInjectionEnabled in interface IMessageProcessorpublic void setLastErrorMessage(String msg)
setLastErrorMessage in interface IMessageProcessorCopyright © 2008–2017 MIL-OSS. All rights reserved.