try { shouldTerminateQuietly = owner.sfResolve(ShouldDetachOrTerminate.ATTR_SHOULD_TERMINATE_QUIETLY, shouldTerminateQuietly, true); shouldTerminateQuietlyRead = true; } catch (RemoteException ex) { } catch (SmartFrogResolutionException ex) {
TerminationRecord record = null; if (terminateRequired) {  if (terminationType == null) {  terminationType = thrown == null ? TerminationRecord.NORMAL : TerminationRecord.ABNORMAL; } if (terminationMessage == null) {  terminationMessage = "Self Detach and\\or Termination: "; } if (refId == null) { refId = completeNameSafe(); }  record = new TerminationRecord(terminationType, terminationMessage, refId, thrown);
    public void sfSelfDetachAndOrTerminate(String terminationType,                                           String terminationMessage,                                           Reference refId, Throwable thrown) {        /** Flag indicating detachment. */        boolean shouldDetach = false;        /** Flag indicating if the sfShouldDetach attribute was read. */        boolean shouldDetachRead = false;        /**         * flag indicating termination.         * whenever execution ends         */        boolean shouldTerminate = true;        /** Flag indicating if the sfShouldTerminate attribute was read. */        boolean shouldTerminateRead = false;        /**         * flag indicating termination.         * whenever execution ends         */        boolean shouldTerminateQuietly = false;        /** Flag indicating if the sfShouldTerminate attribute was read. */        boolean shouldTerminateQuietlyRead = false;        try {            shouldTerminate = owner.sfResolve(                    ShouldDetachOrTerminate.ATTR_SHOULD_TERMINATE, shouldTerminate, true);            shouldTerminateRead = true;        } catch (RemoteException ex) {        } catch (SmartFrogResolutionException ex) {        }        try {            shouldTerminateQuietly = owner.sfResolve(ShouldDetachOrTerminate.ATTR_SHOULD_TERMINATE_QUIETLY, shouldTerminateQuietly, true);            shouldTerminateQuietlyRead = true;        } catch (RemoteException ex) {        } catch (SmartFrogResolutionException ex) {        }        try {            shouldDetach = owner.sfResolve(ShouldDetachOrTerminate.ATTR_SHOULD_DETACH, shouldDetach, true);            shouldDetachRead = true;        } catch (RemoteException ex) {        } catch (SmartFrogResolutionException ex) {        }        if (shouldTerminateRead) {            if (terminationMessage==null) {                terminationMessage = "Self Detatch and\\or Termination: ";            }            TerminationRecord termR = new TerminationRecord(terminationType,                                            terminationMessage,                                            completeNameSafe(),                                            thrown);            TerminatorThread terminator = new TerminatorThread(owner, termR);            if (shouldDetachRead&&shouldDetach) {                terminator.detach();            }            if ((shouldTerminateQuietlyRead)&&(!shouldTerminateQuietly)) {                terminator.quietly();            }            if ((shouldTerminateRead)&&(!shouldTerminate)) {                terminator.dontTerminate();            }            terminator.start();        } else {            if (shouldDetachRead) {                new TerminatorThread(owner, null).dontTerminate().detach().start();            }        }    }