|
|||||||||
| Home >> All >> [ IM overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
IM
Class IMReceivedMessageQueue

java.lang.ObjectIM.IMReceivedMessageQueue
- public class IMReceivedMessageQueue
- extends java.lang.Object
This class is used to store received messages and make them available for user of Instant-Messenger.
| Field Summary | |
private static int |
DEFAULT_INFO_TIMEOUT
|
private IM |
im
|
private int |
licznik
|
private int |
messageFreeSpace
Remember number of free space in messageQueue Vector, size of messageQueue minus used space. |
private java.util.Vector |
messageQueue
Stores received messages (objects of Message class) |
private int |
messageQueueSize
Remembers size of messageQueue Vector, which is constant inspite of adding or removing elements stored in messageQueue. |
int |
messageUsedSpace
Remember number of reserved space in messageQueue Vector, occupied by objects of Message class. |
(package private) mobile.jmsapi.TextMessage |
newMessage
|
mobile.util.synchronization.BinarySemaphore |
semaphore
Represents object of BinarySemaphore class, which protect exclusive access to vector messageQueue |
| Constructor Summary | |
IMReceivedMessageQueue(int bufferSize)
Class constructor - initializes messageQueue Vector, which size is bufferSize, and its protective semaphore |
|
| Method Summary | |
boolean |
addReceivedMessage(mobile.jmsapi.TextMessage receivedMessage)
|
boolean |
addReceivedMessageWithResizeBuffer(mobile.jmsapi.TextMessage receivedMessage)
Synchronized method which adds object of Message class to messageQueue and enlarges messageQueue |
void |
freeMessageSpace()
Synchronized method which release reserved space in messageQueue |
mobile.jmsapi.TextMessage |
getMessage(int index)
Synchronized method which returns object of Message class stored in messageQueue at index specified in parameter index |
void |
log(java.lang.String str)
Synchronized method which adds object of Message class to messageQueue |
boolean |
removeReceivedMessage(int index)
Synchronized method which removes object of Message class at index specified in parameter index |
boolean |
reserveMessageSpace()
Synchronized method which reserves space in messageQueue for new message |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
semaphore
public mobile.util.synchronization.BinarySemaphore semaphore
Represents object of BinarySemaphore class, which protect exclusive access to vector messageQueue
DEFAULT_INFO_TIMEOUT
private static final int DEFAULT_INFO_TIMEOUT
- See Also:
- Constant Field Values
im
private IM im
licznik
private int licznik
newMessage
mobile.jmsapi.TextMessage newMessage
messageQueue
private java.util.Vector messageQueue
Stores received messages (objects of Message class)
messageQueueSize
private int messageQueueSize
Remembers size of messageQueue Vector, which is constant inspite of adding or removing elements stored in messageQueue.
messageFreeSpace
private int messageFreeSpace
Remember number of free space in messageQueue Vector, size of messageQueue minus used space.
messageUsedSpace
public int messageUsedSpace
Remember number of reserved space in messageQueue Vector, occupied by objects of Message class.
| Constructor Detail |
IMReceivedMessageQueue
public IMReceivedMessageQueue(int bufferSize)
Class constructor - initializes messageQueue Vector, which size is bufferSize, and its protective semaphore
| Method Detail |
reserveMessageSpace
public boolean reserveMessageSpace()
Synchronized method which reserves space in messageQueue for new message
freeMessageSpace
public void freeMessageSpace()
Synchronized method which release reserved space in messageQueue
log
public void log(java.lang.String str)
Synchronized method which adds object of Message class to messageQueue
addReceivedMessage
public boolean addReceivedMessage(mobile.jmsapi.TextMessage receivedMessage)
addReceivedMessageWithResizeBuffer
public boolean addReceivedMessageWithResizeBuffer(mobile.jmsapi.TextMessage receivedMessage)
Synchronized method which adds object of Message class to messageQueue and enlarges messageQueue
removeReceivedMessage
public boolean removeReceivedMessage(int index)
Synchronized method which removes object of Message class at index specified in parameter index
getMessage
public mobile.jmsapi.TextMessage getMessage(int index)
Synchronized method which returns object of Message class stored in messageQueue at index specified in parameter index
|
|||||||||
| Home >> All >> [ IM overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
IM.IMReceivedMessageQueue