forked from itstamen/rop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.chage rop-sample acorrding the change of rop project.
- Loading branch information
stamen
committed
Jul 29, 2012
1 parent
c921c25
commit db55e37
Showing
13 changed files
with
304 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
rop-sample/src/main/java/com/rop/sample/LogoutService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* 版权声明:中图一购网络科技有限公司 版权所有 违者必究 2012 | ||
* 日 期:12-7-27 | ||
*/ | ||
package com.rop.sample; | ||
|
||
import com.rop.RopRequest; | ||
import com.rop.RopResponse; | ||
import com.rop.annotation.ServiceMethod; | ||
import com.rop.annotation.ServiceMethodBean; | ||
|
||
/** | ||
* <pre> | ||
* 功能说明: | ||
* </pre> | ||
* | ||
* @author 陈雄华 | ||
* @version 1.0 | ||
*/ | ||
@ServiceMethodBean(version = "1.0") | ||
public class LogoutService { | ||
|
||
@ServiceMethod(value = "user.logout") | ||
public RopResponse logout(RopRequest request){ | ||
return new RopResponse() {}; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
rop-sample/src/main/java/com/rop/sample/SamplePreDoServiceEventListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* 版权声明:中图一购网络科技有限公司 版权所有 违者必究 2012 | ||
* 日 期:12-7-17 | ||
*/ | ||
package com.rop.sample; | ||
|
||
import com.rop.RopRequestContext; | ||
import com.rop.RopRequest; | ||
import com.rop.event.PreDoServiceEvent; | ||
import com.rop.event.RopEventListener; | ||
import com.rop.marshaller.MessageMarshallerUtils; | ||
|
||
/** | ||
* <pre> | ||
* 功能说明: | ||
* </pre> | ||
* | ||
* @author 陈雄华 | ||
* @version 1.0 | ||
*/ | ||
public class SamplePreDoServiceEventListener implements RopEventListener<PreDoServiceEvent> { | ||
|
||
@Override | ||
public void onRopEvent(PreDoServiceEvent ropEvent) { | ||
RopRequestContext ropRequestContext = ropEvent.getRopRequestContext(); | ||
if(ropRequestContext != null && ropRequestContext.getRopRequest() != null){ | ||
RopRequest ropRequest = ropRequestContext.getRopRequest(); | ||
String message = MessageMarshallerUtils.getMessage(ropRequest, ropRequestContext.getMessageFormat()); | ||
System.out.println("message("+ropEvent.getServiceBeginTime()+")"+message); | ||
} | ||
} | ||
|
||
@Override | ||
public int getOrder() { | ||
return 1; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
rop-sample/src/main/java/com/rop/sample/SampleThreadFerry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* 版权声明:中图一购网络科技有限公司 版权所有 违者必究 2012 | ||
* 日 期:12-7-20 | ||
*/ | ||
package com.rop.sample; | ||
|
||
import com.rop.ThreadFerry; | ||
|
||
/** | ||
* <pre> | ||
* 功能说明: | ||
* </pre> | ||
* | ||
* @author 陈雄华 | ||
* @version 1.0 | ||
*/ | ||
public class SampleThreadFerry implements ThreadFerry{ | ||
|
||
@Override | ||
public void doInSrcThread() { | ||
System.out.println("doInSrcThread:"+Thread.currentThread().getId()); | ||
} | ||
|
||
@Override | ||
public void doInDestThread() { | ||
System.out.println("doInSrcThread:"+Thread.currentThread().getId()); | ||
} | ||
} | ||
|
Oops, something went wrong.