|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.m2technologies.open_arm.transport.transaction.AbstractTransactionMediatorImpl
Copyright 2005 Mark Masterson
Licensed under the Apache License, Version 2.0 (the "License");
you may
not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Description: This class implements the core functionality for all TransactionTransportMediators..
| Constructor Summary | |
protected |
AbstractTransactionMediatorImpl(java.lang.Object transactionDelegate)
Creates an instance of this class. |
| Method Summary | |
int |
bindThread()
Deprecated. We may not ever implement this method! |
long |
blocked()
Obtains the next locking handle from the transaction delegate, calls the hook method #doBlocked, and returns the handle. |
protected abstract void |
doBlocked(long tmpHandle)
Concrete implementations implement this method to persist/record/transmit the event. |
protected abstract void |
doStop(long elapsedTime,
long totalElapsedTime,
int status,
java.lang.String diagnosticDetail)
Concrete implementations implement this method to persist/record/transmit the event. |
protected abstract void |
doUnblocked(long blockHandle)
Concrete implementations implement this method to persist/record/transmit the event. |
protected abstract void |
doUpdate(long runningTime,
long totalRunningTime)
Concrete implementations implement this method to persist/record/transmit the event. |
ArmApplication |
getApplication()
Invokes the method of the same name on the delegate instance of ArmTransaction that the constructor is given. |
protected java.lang.String |
getBlockedMessage(long tmpHandle)
|
java.lang.String |
getContextURIValue()
Invokes the method of the same name on the delegate instance of ArmTransaction that the constructor is given. |
java.lang.String |
getContextValue(int index)
Invokes the method of the same name on the delegate instance of ArmTransaction that the constructor is given. |
ArmCorrelator |
getCorrelator()
Invokes the method of the same name on the delegate instance of ArmTransaction that the constructor is given. |
protected ArmTransactionFactory |
getCreatingFactory()
Invokes the method of the same name on the delegate instance of ArmTransaction that the constructor is given. |
ArmTransactionDefinition |
getDefinition()
Invokes the method of the same name on the delegate instance of ArmTransaction that the constructor is given. |
protected ArmTransaction |
getDelegate()
|
int |
getErrorCode()
Invokes the method of the same name on the delegate instance of ArmTransaction that the constructor is given. |
java.lang.String |
getErrorMessage(int errorCode)
Invokes the method of the same name on the delegate instance of ArmTransaction that the constructor is given. |
ArmMetricGroup |
getMetricGroup()
Invokes the method of the same name on the delegate instance of ArmTransaction that the constructor is given. |
ArmCorrelator |
getParentCorrelator()
Invokes the method of the same name on the delegate instance of ArmTransaction that the constructor is given. |
int |
getStatus()
Invokes the method of the same name on the delegate instance of ArmTransaction that the constructor is given. |
protected java.lang.String |
getStopMessage(long elapsedTime,
long totalElapsedTime,
int status,
java.lang.String diagnosticDetail)
|
ArmTransactionWithMetricsDefinition |
getTransactionWithMetricsDefinition()
Invokes the method of the same name on the delegate instance of ArmTransaction that the constructor is given. |
protected java.lang.String |
getUnblockedMessage(long blockHandle)
|
protected java.lang.String |
getUpdateMessage(long runningTime,
long totalRunningTime)
|
ArmUser |
getUser()
Invokes the method of the same name on the delegate instance of ArmTransaction that the constructor is given. |
boolean |
isTraceRequested()
Invokes the method of the same name on the delegate instance of ArmTransaction that the constructor is given. |
int |
reset()
Resets all of the transaction delimited attributes of the delegate object. |
int |
setArrivalTime()
Invokes the method of the same name on the delegate instance of ArmTransaction that the constructor is given. |
int |
setContextURIValue(java.lang.String value)
Invokes the method of the same name on the delegate instance of ArmTransaction that the constructor is given. |
int |
setContextValue(int index,
java.lang.String value)
Invokes the method of the same name on the delegate instance of ArmTransaction that the constructor is given. |
int |
setErrorCode(int errorCode)
Invokes the method of the same name on the delegate instance of ArmTransaction that the constructor is given. |
int |
setTraceRequested(boolean traceState)
Invokes the method of the same name on the delegate instance of ArmTransaction that the constructor is given. |
void |
setTransactionalDelegate(java.lang.Object transactionDelegate)
This class has an association with an instance of ArmTransaction -- the caller must either provide that instance here, or pass it to the constructor. |
int |
setUser(ArmUser user)
Invokes the method of the same name on the delegate instance of ArmTransaction that the constructor is given. |
int |
start()
Invokes the method of the same name on the delegate instance of ArmTransaction that the constructor is given, and sets the start time to System.currentTimeMillis(). |
int |
start(ArmCorrelator parentCorr)
Invokes the method of the same name on the delegate instance of ArmTransaction that the constructor is given, sets the start time to System.currentTimeMillis(), and the parent correlator to the value of the parameter passed to this method. |
int |
start(byte[] parentCorr)
See start(ArmCorrelator parentCorr) |
int |
start(byte[] parentCorr,
int offset)
Deprecated. We may never implement this method! |
int |
stop(int status)
See stop(int status, String diagnosticDetail) |
int |
stop(int status,
java.lang.String diagnosticDetail)
This method obtains the stop time via System.currentTimeMillis(), calculates the elapsed time by subtracting the start time recorded in the transactional delegates' instance from this value, calculates the total elapsed time (if needed) by subtracting the transactional delegates' instance of the arrival time from the stop time, and calls the protected hook method #doStop to allow concrete implementations to record/persist the event. |
int |
unbindThread()
Deprecated. We may never implement this method! |
int |
unblocked(long blockHandle)
Calls the #doUnblocked hook method. |
int |
update()
Obtains the update timestamp via System.currentTimeMillis(). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.m2technologies.open_arm.transport.TransportMediator |
setConfiguration |
| Constructor Detail |
protected AbstractTransactionMediatorImpl(java.lang.Object transactionDelegate)
transactionDelegate - | Method Detail |
public final void setTransactionalDelegate(java.lang.Object transactionDelegate)
setTransactionalDelegate in interface TransportMediatortransactionDelegate - protected ArmTransactionFactory getCreatingFactory()
public int bindThread()
bindThread in interface ArmTransactionpublic long blocked()
blocked in interface ArmTransactionprotected abstract void doBlocked(long tmpHandle)
tmpHandle - public ArmApplication getApplication()
getApplication in interface ArmTransactionpublic java.lang.String getContextURIValue()
getContextURIValue in interface ArmTransactionpublic java.lang.String getContextValue(int index)
getContextValue in interface ArmTransactionindex - of the desired context value
public ArmCorrelator getCorrelator()
getCorrelator in interface ArmTransactionpublic ArmCorrelator getParentCorrelator()
getParentCorrelator in interface ArmTransactionpublic int getStatus()
getStatus in interface ArmTransactionpublic ArmTransactionDefinition getDefinition()
getDefinition in interface ArmTransactionpublic ArmUser getUser()
getUser in interface ArmTransactionpublic boolean isTraceRequested()
isTraceRequested in interface ArmTransactionpublic int reset()
reset in interface ArmTransactionpublic int setArrivalTime()
setArrivalTime in interface ArmTransactionpublic int setContextURIValue(java.lang.String value)
setContextURIValue in interface ArmTransactionvalue -
public int setContextValue(int index,
java.lang.String value)
setContextValue in interface ArmTransactionindex - value -
public int setTraceRequested(boolean traceState)
setTraceRequested in interface ArmTransactiontraceState -
public int setUser(ArmUser user)
setUser in interface ArmTransactionuser -
public int start()
start in interface ArmTransactionpublic int start(byte[] parentCorr)
start(ArmCorrelator parentCorr)
start in interface ArmTransactionparentCorr -
public int start(byte[] parentCorr,
int offset)
start in interface ArmTransactionparentCorr - offset -
public int start(ArmCorrelator parentCorr)
start in interface ArmTransactionparentCorr -
public int stop(int status)
stop(int status, String diagnosticDetail)
stop in interface ArmTransactionstatus -
public int stop(int status,
java.lang.String diagnosticDetail)
stop in interface ArmTransactionstatus - diagnosticDetail -
protected abstract void doStop(long elapsedTime,
long totalElapsedTime,
int status,
java.lang.String diagnosticDetail)
elapsedTime - totalElapsedTime - status - diagnosticDetail - public int unbindThread()
unbindThread in interface ArmTransactionpublic int unblocked(long blockHandle)
unblocked in interface ArmTransactionblockHandle -
protected abstract void doUnblocked(long blockHandle)
blockHandle - public int update()
update in interface ArmTransaction
protected abstract void doUpdate(long runningTime,
long totalRunningTime)
runningTime - totalRunningTime - public int getErrorCode()
getErrorCode in interface ArmInterfacepublic int setErrorCode(int errorCode)
setErrorCode in interface ArmInterfaceerrorCode -
public java.lang.String getErrorMessage(int errorCode)
getErrorMessage in interface ArmInterfaceerrorCode -
public ArmTransactionWithMetricsDefinition getTransactionWithMetricsDefinition()
getTransactionWithMetricsDefinition in interface ArmTransactionWithMetricspublic ArmMetricGroup getMetricGroup()
getMetricGroup in interface ArmTransactionWithMetricsprotected ArmTransaction getDelegate()
protected java.lang.String getBlockedMessage(long tmpHandle)
protected java.lang.String getStopMessage(long elapsedTime,
long totalElapsedTime,
int status,
java.lang.String diagnosticDetail)
protected java.lang.String getUnblockedMessage(long blockHandle)
protected java.lang.String getUpdateMessage(long runningTime,
long totalRunningTime)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||