本文整理匯總了Java中org.kuali.rice.ksb.messaging.remotedservices.Inbox類的典型用法代碼示例。如果您正苦於以下問題:Java Inbox類的具體用法?Java Inbox怎麽用?Java Inbox使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Inbox類屬於org.kuali.rice.ksb.messaging.remotedservices包,在下文中一共展示了Inbox類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: storeInbox
import org.kuali.rice.ksb.messaging.remotedservices.Inbox; //導入依賴的package包/類
public synchronized Inbox storeInbox(Inbox inbox) {
String id = inbox.getId();
if (id == null) {
lastInboxId++;
id = String.valueOf(lastInboxId);
inbox.setId(id);
}
inboxes.put(id, inbox);
return inbox;
}
示例2: createInbox
import org.kuali.rice.ksb.messaging.remotedservices.Inbox; //導入依賴的package包/類
/**
* @see org.kuali.rice.ksb.messaging.remotedservices.InboxResource#createInbox(org.kuali.rice.ksb.messaging.remotedservices.Inbox)
*/
public Inbox createInbox(Inbox inbox) {
return storage.storeInbox(inbox);
}
示例3: retrieveInbox
import org.kuali.rice.ksb.messaging.remotedservices.Inbox; //導入依賴的package包/類
/**
* @see org.kuali.rice.ksb.messaging.remotedservices.InboxResource#retrieveInbox(java.lang.String)
*/
public Inbox retrieveInbox(String id) {
return storage.retrieveInbox(id);
}
示例4: updateInbox
import org.kuali.rice.ksb.messaging.remotedservices.Inbox; //導入依賴的package包/類
/**
* @see org.kuali.rice.ksb.messaging.remotedservices.InboxResource#updateInbox(org.kuali.rice.ksb.messaging.remotedservices.Inbox)
*/
public void updateInbox(Inbox inbox) {
storage.storeInbox(inbox);
}
示例5: Storage
import org.kuali.rice.ksb.messaging.remotedservices.Inbox; //導入依賴的package包/類
public Storage() {
inboxes = new HashMap<String, Inbox>();
messages = new HashMap<String, Message>();
lastInboxId = 0;
lastMessageId = 0;
}
示例6: retrieveInbox
import org.kuali.rice.ksb.messaging.remotedservices.Inbox; //導入依賴的package包/類
public Inbox retrieveInbox(String id) {
return inboxes.get(id);
}
示例7: deleteInbox
import org.kuali.rice.ksb.messaging.remotedservices.Inbox; //導入依賴的package包/類
public synchronized Inbox deleteInbox(String id) {
return inboxes.remove(id);
}
示例8: exerciseMessagingService
import org.kuali.rice.ksb.messaging.remotedservices.Inbox; //導入依賴的package包/類
/**
* This method ...
*
* @param inboxResource
* @param messageResource
*/
private void exerciseMessagingService(InboxResource inboxResource,
MessageResource messageResource) {
Inbox inbox = new Inbox();
inbox.setOwner("Joe Q. Tester");
inbox = inboxResource.createInbox(inbox);
Message message = new Message();
message.setRecipient("Joe Q. Tester");
message.setSubject("Hello new world!");
message.setText("This is a test message.");
Message createdMessage = messageResource.createMessage(message);
List<String> messages = inbox.getMessages();
messages.add(createdMessage.getId());
inboxResource.updateInbox(inbox);
inbox = inboxResource.retrieveInbox(inbox.getId());
List<String> updatedMessages = inbox.getMessages();
String updatedMessageId = updatedMessages.get(0);
Message retrievedMessage = messageResource.retrieve(updatedMessageId);
assertTrue(retrievedMessage.getSubject().equals("Hello new world!"));
}