| 42 | } |
| 43 | |
| 44 | public Child async(String args, Child.EventReceiver receiver) throws ChildManager.ChildNotStartedException { |
| 45 | |
| 46 | if(!mEnabled) { |
| 47 | Logger.warning(mHandler + (mCmdPrefix != null ? ":" + mCmdPrefix : "" ) + ": disabled"); |
| 48 | throw new ChildManager.ChildNotStartedException(); |
| 49 | } |
| 50 | |
| 51 | if(mCmdPrefix!=null) { |
| 52 | if(args != null) { |
| 53 | args = mCmdPrefix + " " + args; |
| 54 | } else { |
| 55 | args = mCmdPrefix; |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | return ChildManager.async(mHandler, args, mEnv, receiver); |
| 60 | } |
| 61 | |
| 62 | public Child async(String args) throws ChildManager.ChildNotStartedException { |
| 63 | return this.async(args, null); |