/** * Handle unknown bean. * * @param inBean the unknown bean */ private void handleUnknownBean(XMPPBean inBean) { getAgent() .getConnection() .sendPacket( new BeanIQAdapter( BeanHelper.CreateErrorBean( inBean, "wait", "unexpected-request", "This request is not supported"))); }
/** * Handle prepare service upload bean. * * @param inBean the bean */ private void handlePrepareServiceUploadBean(PrepareServiceUploadBean inBean) { XMPPBean outBean = null; // if no name was set, respond an error if (null == inBean.Filename || inBean.Filename.length() < 1) { outBean = BeanHelper.CreateErrorBean( inBean, "modify", "not-acceptable", "File name is null or empty."); } else { // store information in expected upload collection synchronized (_expectedUploads) { _expectedUploads.put( inBean.getFrom(), new FileUploadInformation(inBean.Filename, inBean.autoDeploy, inBean.singleMode)); } outBean = BeanHelper.CreateResultBean(inBean, new PrepareServiceUploadBean(true)); } getAgent().getConnection().sendPacket(new BeanIQAdapter(outBean)); }