WebLogic Integration


com.bea.lwclient
Interface LwcMailboxDirectory

All Known Implementing Classes:
LwcMailbox

public interface LwcMailboxDirectory
extends weblogic.rmi.Remote

The LwcMailboxDirectory manages message management in a mailbox

Author:
Copyright © 2000, 2001 BEA Systems, Inc. All Rights Reserved.

Method Summary
 void addMessage(MessageInfo minfo, byte[] msg, boolean filesharing)
          Adds a message to the mailbox.
 void createMailbox(java.lang.String name)
          Create a mailbox with the specified name.
 void expungeMessages()
          Deletes all messages from the mailbox.
 byte[] getMessage(java.lang.String msgid)
          Returns the payload of the message with the specified id.
 int getMessageCount()
          Returns the number of messages in the mailbox.
 MessageInfo[] getMessageInfos()
          Returns info about all messages in the mailbox.
 byte[][] getNewMessagesContent()
          Returns array of new message contents in given mailbox
 java.lang.String getSender(java.lang.String messageid)
          Returns sender of a particular message in a mailbox
 boolean isExistMailbox(java.lang.String name)
          Returns a boolean true if the mailbox with the specified name exists.
 void listen(java.lang.String outMbox, java.lang.String url)
          Listens for messages coming into the mailbox and sends an XML event to the internal JMS EventQueue.
 void removeMailbox(java.lang.String name)
          Remove the mailbox with the specified name.
 void removeMessage(java.lang.String msgid)
          Removes the message with the specified id from the mailbox.
 void setMessageStatus(java.lang.String msgid, int status)
          Sets the status of the message to the specified value.
 

Method Detail

createMailbox

public void createMailbox(java.lang.String name)
                   throws LwcMailboxException,
                          weblogic.rmi.RemoteException
Create a mailbox with the specified name.

Parameters:
name - Name of the mailbox to create.
Throws:
LwcMailboxException - If mailbox creation fails.
weblogic.rmi.RemoteException -  

removeMailbox

public void removeMailbox(java.lang.String name)
                   throws LwcMailboxException,
                          weblogic.rmi.RemoteException
Remove the mailbox with the specified name.

Parameters:
name - Name of the mailbox to remove.
Throws:
LwcMailboxException - If mailbox removal fails.
weblogic.rmi.RemoteException -  

isExistMailbox

public boolean isExistMailbox(java.lang.String name)
                       throws LwcMailboxException,
                              weblogic.rmi.RemoteException
Returns a boolean true if the mailbox with the specified name exists. If the specified mailbox does not exist (mailbox is null), it returns false.

Parameters:
name - Name of the mailbox.
Returns:
boolean - true/false
Throws:
LwcMailboxException - If mailbox operation fails.
weblogic.rmi.RemoteException -  

addMessage

public void addMessage(MessageInfo minfo,
                       byte[] msg,
                       boolean filesharing)
                throws LwcMailboxException,
                       weblogic.rmi.RemoteException
Adds a message to the mailbox.

Parameters:
minfo - Metadata info of the message.
msg - The message payload.
filesharing - If true file sharing client tries to add message
Throws:
LwcMailboxException - If mailbox operation fails.

removeMessage

public void removeMessage(java.lang.String msgid)
                   throws LwcMailboxException,
                          weblogic.rmi.RemoteException
Removes the message with the specified id from the mailbox.

Parameters:
msgid - Identifier of the message to be removed.
Throws:
LwcMailboxException - If mailbox operation fails.
weblogic.rmi.RemoteException -  

getMessageCount

public int getMessageCount()
                    throws LwcMailboxException,
                           weblogic.rmi.RemoteException
Returns the number of messages in the mailbox.

Returns:
int - number of messages.
Throws:
LwcMailboxException - If mailbox operation fails.
weblogic.rmi.RemoteException -  

getMessageInfos

public MessageInfo[] getMessageInfos()
                              throws LwcMailboxException,
                                     weblogic.rmi.RemoteException
Returns info about all messages in the mailbox. If the mailbox is ordered, the returned messages will be sequenced in the same order in which they were added.

Returns:
MessageInfo[] - Array of message info.
Throws:
LwcMailboxException - If mailbox operation fails.
weblogic.rmi.RemoteException -  

getMessage

public byte[] getMessage(java.lang.String msgid)
                  throws LwcMailboxException,
                         weblogic.rmi.RemoteException
Returns the payload of the message with the specified id.

Parameters:
msgid - Message id.
Returns:
byte[] - Message payload.
Throws:
LwcMailboxException - If mailbox operation fails.
weblogic.rmi.RemoteException -  

setMessageStatus

public void setMessageStatus(java.lang.String msgid,
                             int status)
                      throws LwcMailboxException,
                             weblogic.rmi.RemoteException
Sets the status of the message to the specified value. Valid status values are MessageInfo.StatusNew and MessageInfo.StatusRead

Parameters:
msgid - Message id.
status - Message status.
Throws:
LwcMailboxException - If mailbox operation fails.
weblogic.rmi.RemoteException -  

expungeMessages

public void expungeMessages()
                     throws LwcMailboxException,
                            weblogic.rmi.RemoteException
Deletes all messages from the mailbox.

Throws:
LwcMailboxException - If mailbox operation fails.
weblogic.rmi.RemoteException -  

listen

public void listen(java.lang.String outMbox,
                   java.lang.String url)
            throws weblogic.rmi.RemoteException
Listens for messages coming into the mailbox and sends an XML event to the internal JMS EventQueue.

Parameters:
outMbox - outgoing mailbox name.
url - Weblogic URL for JNDI context lookup.

getSender

public java.lang.String getSender(java.lang.String messageid)
                           throws LwcMailboxException,
                                  weblogic.rmi.RemoteException
Returns sender of a particular message in a mailbox

Parameters:
messageid - Unique Message Identifier.
Returns:
String sender name

getNewMessagesContent

public byte[][] getNewMessagesContent()
                               throws LwcMailboxException,
                                      weblogic.rmi.RemoteException
Returns array of new message contents in given mailbox

Returns:
byte[][] array of new message content in bytes

WebLogic Integration

WebLogic Integration (WLI)