JavaʵÏÖXMPP·¢ËͽÓÊÕÏûÏ¢ºÍÎļþ¹¦ÄÜ
package test;
import java.io.File;
import org.jivesoftware.smack.Chat;
import org.jivesoftware.smack.ConnectionConfiguration;
import org.jivesoftware.smack.MessageListener;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smackx.filetransfer.FileTransfer;
import org.jivesoftware.smackx.filetransfer.FileTransferListener;
import org.jivesoftware.smackx.filetransfer.FileTransferManager;
import org.jivesoftware.smackx.filetransfer.FileTransferRequest;
import org.jivesoftware.smackx.filetransfer.IncomingFileTransfer;
import org.jivesoftware.smackx.filetransfer.OutgoingFileTransfer;
/**
* ÑÝʾXMPP·¢ËͽÓÊÕÏûÏ¢ºÍÎļþµÄ¹¦ÄÜ
*
* @author Íõ½Ü
* @date 2010-1-14 16:59:24
*/
public class XMPPTest {
private static void handleTransferRequest(FileTransferRequest request) {
File file = new File(request.getFileName());
IncomingFileTransfer transfer = request.accept();
try {
transfer.recieveFile(file);
} catch (XMPPException e) {
e.printStackTrace();
}
}
/* ·¢ËÍÎļþ */
public static void sendFile(FileTransferManager transferManager,
String user, File file, XMPPConnection connection) throws Exception {
OutgoingFileTransfer transfer = transferManager
.createOutgoingFileTransfer(user);
long timeOut = 100000;
long sleepMin = 3000;
long spTime = 0;
int rs = 0;
transfer.sendFile(file, "Send file!");
rs = transfer.getStatus().compareTo(FileTransfer.Status.complete);
while (rs != 0) {
rs = transfer.getStatus().compareTo(FileTransfer.Status.complete);
spTime = spTime + sleepMin;
if (spTime > timeOut) {
Ïà¹ØÎĵµ£º
µÚÒ»ÖÖÇé¿ö£ºÎÞ·µ»ØÖµ.
create or replace procedure test_a(param1 in varchar2,param2 in varchar2) as
begin
insert into test value(param1,param2);
&nb ......
±¾ÎÄÄÚÈÝÕª×Ô£º¡¶Java Web¿ª·¢½Ì³Ì——ÈëÃÅÓëÌá¸ßƪ£¨JSP+Servlet£©¡·
½»»¥µÄ»ù±¾¹ý³Ì°üÀ¨£º
l ´´½¨XMLHttpRequest¶ÔÏó£»
l ·¢ËÍÇëÇó£»
l ´¦ÀíÏìÓ¦¡£
´ ......
±¾ÎÄÄÚÈÝÕª×Ô£º¡¶Java Web¿ª·¢½Ì³Ì——ÈëÃÅÓëÌá¸ßƪ£¨JSP+Servlet£©¡·
AJAXÊÇAsynchronous JavaScript and XMLµÄËõд£¬Éæ¼°JavaScript½Å±¾¡¢XHTMLºÍCSS¡¢DOM¡¢XMLºÍXSTLµÈ¼¼Êõ¡£
l XHTMLÓëCSSʵÏÖÊý¾ÝÐÅÏ¢µÄͳһ»¯ºÍ±ê×¼»¯ÏÔʾ£»
l & ......
javaµ÷webServiceÌ«Õý³£ÁË¡£¡£¡£
ÔÚµ÷ÓÃhttpsµÄwebServiceµÄʱºò¼¸ÖÖ³£Óõķ½·¨»á³öÏÖ°²È«´íÎ󣬺ܶàÈË˵µÄÊÇÔÚjreÀïÃæ×°Ö¤Êé¡£¡£¡£ÄÇҲ̫ÓôÃÆÁË°É
ÕâÀïÌṩһÖÖ²»ÓÃÖ¤ÊéµÄ·½Ê½
¶Ô·½webServiceÌṩµÄ½Ó¿Ú£¬Õâ¸öÄãÓ¦¸ÃÒªÖªµÀµÄ°É£¬²»ÖªµÀµÄ»°¾Íwsdl×Ô¼º»¹Ô
Java´úÂë
/**
* XXXµÄwebService½Ó¿ ......
Õâ¸ö¿ò¼ÜÒ²ÊÇΪgoogle app engine×¼±¸µÄ¡£µ±Ê±¸Ð¾õÖ±½ÓÔÚgaeÉÏsevletÌ«·³ÈËÁË£¬¾Í·â×°¸ö¼òÒ׵Ŀò¼Ü¡£Ê¹ÓõÄʱºòÖ»ÐèÒªÅäÖÃweb.xmlÖÐDispacherSevletºÍpackage.propertiesÖеÄpackage.path£¨Ä¬ÈÏɨÃèµÄ°ü£©¼´¿É
gaeÀý×Ó£ºhttp://orzblogs.appspot.com/Home.htm
´óѧµÄʱºòºÜBS java£¬Ñ§ÁËÖ®ºó¾ÍÈÓµôÁË£¬ÏÖÔÚ¹¤×÷Á˲ſªÊ¼ ......