Package com.isode.som.pumice.objects
Class SomPumiceMessageStore
java.lang.Object
com.isode.som.pumice.objects.SomPumiceObject
com.isode.som.pumice.objects.SomPumiceMessageStore
- All Implemented Interfaces:
SomPumiceHandler
,SomHandler
Class which models an Isode X.400 Message Store server, including the
mailboxes which it supports and any P7/P3 connections into and out of
the server.
- Author:
- tc
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
Fields inherited from class com.isode.som.pumice.objects.SomPumiceObject
errortext, somSession
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new empty Message Store object, with some default settings -
Method Summary
Modifier and TypeMethodDescriptionvoid
abort
(SomCommandListener listener) Tell the Message Store to abortvoid
block
(SomCommandListener listener, String op) Tell the Message Store to block an operationGet list of blocked operations in the Message Storevoid
connect()
Connect to the Message StoreGet number of current outstanding Bind operations in the Message StoreGet number of current outstanding cancel deferred delivery operations in the Message StoreGet number of current change credentials operations in the Message StoreGet number of current outstanding delete operations in the Message StoreGet number of current outstanding message delivery operations in the Message StoreGet number of current outstanding report delivery operations in the Message StoreGet number of current outstanding delivery control operations in the Message StoreGet number of current outstanding fetch operations in the Message StoreGet number of current outstanding list operations in the Message StoreGet number of current outstanding registerMS operations in the Message StoreGet number of current outstanding register operations in the Message StoreGet number of current outstanding message submission operations in the Message StoreGet number of current outstanding probe submission operations in the Message StoreGet number of current outstanding summarize operations in the Message StoreGet number of current outstanding unbind operations in the Message Storevoid
Disconnect from the Message Store (if we are connected)Get the set of connections which have been read from the Message Store serverGet current timeGet current Message Store time offsetGet the friendly name for this Message StoreGet the host name used to connect to the Message StoreGet a string summarizing the connection state of the server stats on message countsGet the set of mailboxes which have been read from the Message Store serverGet the password to be used when connecting to the Message Storeint
getPort()
Get the port used to connect to the Message StoreGet the name of the SASL mechanismint
getState()
Return current state of connectionvoid
getStatus
(SomCommandListener listener) Issue a SOM command requesting the status of this object.void
getSubordinateConnections
(SomCommandListener listener) Issue a SOM command requesting the list of connections to this Store.void
getSubordinateMailboxes
(SomCommandListener listener) Issue a SOM command requesting the list of mailboxes subordinate to this Store.Get the user name (SASL id) used when connecting to the Message Storeboolean
Get the value of the flag which indicates whether TLS should be usedvoid
handleBindResponse
(int status, String detail) Handle the response to a Bind operationvoid
handleResponse
(SomCommand command, int status, SomPumiceConnection object) void
handleResponse
(SomCommand command, int status, SomPumiceMailbox object) void
handleResponse
(SomCommand command, int status, SomPumiceMessage object) void
handleResponse
(SomCommand command, int status, String detail) Generic command response handlervoid
handleResponse
(SomCommand command, int status, String[] pairs) void
importBackup
(SomCommandListener listener, String source) boolean
Check whether we are in the middle of connecting to the Store servervoid
logout
(SomCommandListener listener, String mailbox) Tell the Message Store to log out a uservoid
maxconns
(SomCommandListener listener, Integer n) Set the maximum number of connections which the Message Store will acceptvoid
maxmsgs
(SomCommandListener listener, Integer n) Get configured maximum number of messages in Message StoreGet configured maximum number of P3 associations allowed in Message StoreGet configured maximum number of P7 associations allowed in Message Storevoid
maxvol
(SomCommandListener listener, Integer v) Set the maximum volume of messages which the Message Store will acceptGet configured maximum volume of messages in Message Storevoid
monitor
(SomCommandListener listener, Boolean enable) Switch on or off Store monitoring.Get number of mailboxes in Message StoreGet number of messages in Message StoreGet current number of management associations to the Message StoreGet current number of P3 associations to/from the Message StoreGet current number of P7 associations to the Message StoreGet number of reports in Message StoreGet number of submitted messages in Message StoreGet number of DAP search operations queued in the Message Storevoid
rebuild
(SomCommandListener listener) Tell the Message Store rebuild its mailbox listvoid
rebuildStats
(SomCommandListener listener) Tell the Message Store to rebuild its internal statisticsvoid
reload
(SomCommandListener listener) Tell the Message Store to reload its configurationvoid
restart
(SomCommandListener listener) Tell the Message Store to restartvoid
resynchronize
(SomCommandListener listener) Tell the Message Store to resynchronize its indexesstatic void
setConnectionTimeout
(int value) Set the connection timeout used for all SOM sessions created via this objectvoid
Set the friendly name for this Message Storevoid
Set the host name used to connect to the Message Storevoid
Set the password to use when connecting to the Message Storevoid
setPort
(int p) Set the port used to connect to the Message Storevoid
setSaslMechanism
(String mech) Configure the name of the SASL mechanism which we want to use for authenticationvoid
setSizeLimits
(Integer mailboxSizeLimit, Integer messageSizeLimit, Integer connectionSizeLimit) Configure the sizelimits which we will use when requesting information about the number of mailboxes, connections and message from the MS.void
Set the user name (SASL id) to be used when connecting to the Message Storevoid
setUseTls
(boolean use) Set the flag which indicates whether TLS should be used for this connectionvoid
shutdown
(SomCommandListener listener) Tell the Message Store to shut downGet SOM version of Message Storevoid
unblock
(SomCommandListener listener, String op) Tell the Message Store to unlock an operationGet number of unread high priority messages in Message StoreGet number of unread low priority messages in Message StoreGet number of unread medium priority messages in Message Storeuptime()
Get uptime as string for Message Storeversion()
Get version string for Message StoreGet volume of messages in Message StoreGet volume of submitted messages in Message StoreMethods inherited from class com.isode.som.pumice.objects.SomPumiceObject
addAttribute, addAttribute, addBindListener, clearAttributes, getBooleanAttributeValue, getIntegerAttributeValue, getSession, getStringAttributeValue, notifyBindListeners, notifyListener, notifyListeners, notifyListeners, notifyListeners, parsePairs, print, removeBindListener, setSkipNotifications
-
Field Details
-
som_version
-
SOM_PUMICE_DISCONNECTED
public static final int SOM_PUMICE_DISCONNECTED- See Also:
-
SOM_PUMICE_CONNECTING
public static final int SOM_PUMICE_CONNECTING- See Also:
-
SOM_PUMICE_CONNECTED_ANON
public static final int SOM_PUMICE_CONNECTED_ANON- See Also:
-
SOM_PUMICE_CONNECTED_AUTH
public static final int SOM_PUMICE_CONNECTED_AUTH- See Also:
-
-
Constructor Details
-
SomPumiceMessageStore
public SomPumiceMessageStore()Create a new empty Message Store object, with some default settings
-
-
Method Details
-
setConnectionTimeout
public static void setConnectionTimeout(int value) Set the connection timeout used for all SOM sessions created via this object- Parameters:
value
- the timeout value
-
setSizeLimits
public void setSizeLimits(Integer mailboxSizeLimit, Integer messageSizeLimit, Integer connectionSizeLimit) Configure the sizelimits which we will use when requesting information about the number of mailboxes, connections and message from the MS.- Parameters:
mailboxSizeLimit
- limit on the number of mailboxes on which to reportmessageSizeLimit
- limit on the number of messages on which to reportconnectionSizeLimit
- limit on the number of connections on which to report
-
getMailboxes
Get the set of mailboxes which have been read from the Message Store server- Returns:
- Array of SomPumiceMailbox objects
-
getConnections
Get the set of connections which have been read from the Message Store server- Returns:
- Array of SomPumiceConnection objects
-
isConnectionExpected
public boolean isConnectionExpected()Check whether we are in the middle of connecting to the Store server- Returns:
- boolean if expecting to connect
-
getState
public int getState()Return current state of connection- Returns:
- connection state
-
handleBindResponse
Description copied from interface:SomHandler
Handle the response to a Bind operation- Specified by:
handleBindResponse
in interfaceSomHandler
- Parameters:
status
- operation statusdetail
- error detail on failure
-
handleResponse
Description copied from interface:SomHandler
Generic command response handler- Specified by:
handleResponse
in interfaceSomHandler
- Specified by:
handleResponse
in interfaceSomPumiceHandler
- Parameters:
command
- the command to which the response appliesstatus
- status from commanddetail
- error detail
-
handleResponse
- Specified by:
handleResponse
in interfaceSomPumiceHandler
-
handleResponse
- Specified by:
handleResponse
in interfaceSomPumiceHandler
-
handleResponse
- Specified by:
handleResponse
in interfaceSomPumiceHandler
-
handleResponse
- Specified by:
handleResponse
in interfaceSomPumiceHandler
-
getInfoString
Get a string summarizing the connection state of the server stats on message counts- Returns:
- Information string
-
getStatus
Issue a SOM command requesting the status of this object. The response data will be used to update the object, and the listener will be informed.- Parameters:
listener
- Object to notify once status has been updated- Throws:
SomException
- on error
-
getSubordinateMailboxes
Issue a SOM command requesting the list of mailboxes subordinate to this Store. The response data will be used to update the Store object's internal list, and the listener will be informed.- Parameters:
listener
- Object to notify once list of mailboxes has been updated- Throws:
SomException
- on error
-
getSubordinateConnections
Issue a SOM command requesting the list of connections to this Store. The response data will be used to update the Store object's internal list, and the listener will be informed.- Parameters:
listener
- Object to notify once list of connections has been updated- Throws:
SomException
- on error
-
getPort
public int getPort()Get the port used to connect to the Message Store- Returns:
- the port used
-
setPort
public void setPort(int p) Set the port used to connect to the Message Store- Parameters:
p
- the port to be used
-
getHostName
Get the host name used to connect to the Message Store- Returns:
- the host name
-
setHostName
Set the host name used to connect to the Message Store- Parameters:
n
- the host name to use
-
getUsername
Get the user name (SASL id) used when connecting to the Message Store- Returns:
- user name
-
setUsername
Set the user name (SASL id) to be used when connecting to the Message Store- Parameters:
n
- the user name to use
-
getPassword
Get the password to be used when connecting to the Message Store- Returns:
- the password
-
setPassword
Set the password to use when connecting to the Message Store- Parameters:
n
- the password to use
-
getFriendlyName
Get the friendly name for this Message Store- Returns:
- the friendly name
-
setFriendlyName
Set the friendly name for this Message Store- Parameters:
f
- the friendly name to use
-
setUseTls
public void setUseTls(boolean use) Set the flag which indicates whether TLS should be used for this connection- Parameters:
use
- true to use TLS
-
getUseTls
public boolean getUseTls()Get the value of the flag which indicates whether TLS should be used- Returns:
- true if TLS in use
-
connect
Connect to the Message Store- Throws:
SomException
- on error
-
disconnect
Disconnect from the Message Store (if we are connected)- Throws:
SomException
- on error
-
monitor
Switch on or off Store monitoring.- Parameters:
listener
- Listener object which will be updated with new dataenable
- Control whether we are turning monitoring on or off- Throws:
SomException
- on error
-
shutdown
Tell the Message Store to shut down- Parameters:
listener
- which will be informed when the operation is complete- Throws:
SomException
- on error
-
abort
Tell the Message Store to abort- Parameters:
listener
- which will be informed when the operation is complete- Throws:
SomException
- on error
-
restart
Tell the Message Store to restart- Parameters:
listener
- which will be informed when the operation is complete- Throws:
SomException
- on error
-
logout
Tell the Message Store to log out a user- Parameters:
listener
- which will be informed when the operation is completemailbox
- The mailbox to log out, or the string "ALL"- Throws:
SomException
- on error
-
block
Tell the Message Store to block an operation- Parameters:
listener
- which will be informed when the operation is completeop
- the operation to block- Throws:
SomException
- on error
-
importBackup
- Throws:
SomException
-
unblock
Tell the Message Store to unlock an operation- Parameters:
listener
- which will be informed when the operation is completeop
- the operation to unblock- Throws:
SomException
- on error
-
maxconns
Set the maximum number of connections which the Message Store will accept- Parameters:
listener
- which will be informed when the operation is completen
- the maximum number of connections to accept- Throws:
SomException
- on error
-
maxvol
Set the maximum volume of messages which the Message Store will accept- Parameters:
listener
- which will be informed when the operation is completev
- the maximum volume- Throws:
SomException
- on error
-
maxmsgs
- Throws:
SomException
-
rebuild
Tell the Message Store rebuild its mailbox list- Parameters:
listener
- which will be informed when the operation is complete- Throws:
SomException
- on error
-
resynchronize
Tell the Message Store to resynchronize its indexes- Parameters:
listener
- which will be informed when the operation is complete- Throws:
SomException
- on error
-
rebuildStats
Tell the Message Store to rebuild its internal statistics- Parameters:
listener
- which will be informed when the operation is complete- Throws:
SomException
- on error
-
reload
Tell the Message Store to reload its configuration- Parameters:
listener
- which will be informed when the operation is complete- Throws:
SomException
- on error
-
somVersion
Get SOM version of Message Store- Returns:
- som version
- Throws:
SomException
- on error
-
version
Get version string for Message Store- Returns:
- store version string
- Throws:
SomException
- on error
-
uptime
Get uptime as string for Message Store- Returns:
- uptime string
- Throws:
SomException
- on error
-
numMailboxes
Get number of mailboxes in Message Store- Returns:
- number of mailboxes
- Throws:
SomException
- on error
-
numMessages
Get number of messages in Message Store- Returns:
- number of messages
- Throws:
SomException
- on error
-
numReports
Get number of reports in Message Store- Returns:
- number of reports
- Throws:
SomException
- on error
-
numSubmitted
Get number of submitted messages in Message Store- Returns:
- number of submitted messages
- Throws:
SomException
- on error
-
unreadLow
Get number of unread low priority messages in Message Store- Returns:
- number of unread low priority messages
- Throws:
SomException
- on error
-
unreadMedium
Get number of unread medium priority messages in Message Store- Returns:
- number of unread medium priority messages
- Throws:
SomException
- on error
-
unreadHigh
Get number of unread high priority messages in Message Store- Returns:
- number of unread high priority messages
- Throws:
SomException
- on error
-
volMessages
Get volume of messages in Message Store- Returns:
- volume of messages
- Throws:
SomException
- on error
-
volSubmittedMessages
Get volume of submitted messages in Message Store- Returns:
- volume of submitted messages
- Throws:
SomException
- on error
-
maxNumMessages
Get configured maximum number of messages in Message Store- Returns:
- maximum number of messages allowed
- Throws:
SomException
- on error
-
maxVolMessages
Get configured maximum volume of messages in Message Store- Returns:
- maximum volume of messages allowed
- Throws:
SomException
- on error
-
numP7Associations
Get current number of P7 associations to the Message Store- Returns:
- number of P7 associations
- Throws:
SomException
- on error
-
numP3Associations
Get current number of P3 associations to/from the Message Store- Returns:
- number of P3 associations
- Throws:
SomException
- on error
-
numMgmtAssociations
Get current number of management associations to the Message Store- Returns:
- number of management associations
- Throws:
SomException
- on error
-
maxP7Associations
Get configured maximum number of P7 associations allowed in Message Store- Returns:
- number of P7 associations allowed
- Throws:
SomException
- on error
-
maxP3Associations
Get configured maximum number of P3 associations allowed in Message Store- Returns:
- number of P3 associations allowed
- Throws:
SomException
- on error
-
queuedDapSearchOps
Get number of DAP search operations queued in the Message Store- Returns:
- number of queued DAP search operations
- Throws:
SomException
- on error
-
blockedOperations
Get list of blocked operations in the Message Store- Returns:
- string indicating blocked operations
- Throws:
SomException
- on error
-
curBindOps
Get number of current outstanding Bind operations in the Message Store- Returns:
- number of bind operations
- Throws:
SomException
- on error
-
curCancelDeferredDeliveryOps
Get number of current outstanding cancel deferred delivery operations in the Message Store- Returns:
- number of outstanding cancel deferred delivery operations
- Throws:
SomException
- on error
-
curChangeCredentialsOps
Get number of current change credentials operations in the Message Store- Returns:
- number of outstanding change credentials operations
- Throws:
SomException
- on error
-
curDeleteOps
Get number of current outstanding delete operations in the Message Store- Returns:
- number of outstanding delete operations
- Throws:
SomException
- on error
-
curDeliverMessageOps
Get number of current outstanding message delivery operations in the Message Store- Returns:
- number of outstanding message delivery operations
- Throws:
SomException
- on error
-
curDeliverReportOps
Get number of current outstanding report delivery operations in the Message Store- Returns:
- number of outstanding report delivery operations
- Throws:
SomException
- on error
-
curDeliveryControlOps
Get number of current outstanding delivery control operations in the Message Store- Returns:
- number of outstanding delivery control operations
- Throws:
SomException
- on error
-
curFetchOps
Get number of current outstanding fetch operations in the Message Store- Returns:
- number of outstanding fetch operations
- Throws:
SomException
- on error
-
curListOps
Get number of current outstanding list operations in the Message Store- Returns:
- number of outstanding list operations
- Throws:
SomException
- on error
-
curRegisterMsOps
Get number of current outstanding registerMS operations in the Message Store- Returns:
- number of outstanding registerMS operations
- Throws:
SomException
- on error
-
curRegisterOps
Get number of current outstanding register operations in the Message Store- Returns:
- number of outstanding register operations
- Throws:
SomException
- on error
-
curSubmitMessageOps
Get number of current outstanding message submission operations in the Message Store- Returns:
- number of outstanding message submission operations
- Throws:
SomException
- on error
-
curSubmitProbeOps
Get number of current outstanding probe submission operations in the Message Store- Returns:
- number of outstanding probe submission operations
- Throws:
SomException
- on error
-
curSummarizeOps
Get number of current outstanding summarize operations in the Message Store- Returns:
- number of outstanding summarize operations
- Throws:
SomException
- on error
-
curUnbindOps
Get number of current outstanding unbind operations in the Message Store- Returns:
- number of outstanding unbind operations
- Throws:
SomException
- on error
-
getCurrentTimeOffset
Get current Message Store time offset- Returns:
- time offset in seconds
-
getCurrentTime
Get current time- Returns:
- current time
-
setSaslMechanism
Configure the name of the SASL mechanism which we want to use for authentication- Parameters:
mech
- mechanism name which may be null
-
getSaslMechanism
Get the name of the SASL mechanism- Returns:
- SASL mechanism name
-