xmlBlaster 2.2.0 API

org.xmlBlaster.engine.admin
Interface I_AdminSubject

All Superinterfaces:
I_AdminUsage
All Known Subinterfaces:
SubjectInfoProtectorMBean
All Known Implementing Classes:
SubjectInfoProtector

public interface I_AdminSubject
extends I_AdminUsage

Declares available methods of a client for administration.

SNMP or telnet tools can access only the here declared properties.
This interface is implemented by SubjectInfo.java, delivering the meat.

Since:
0.79f
Author:
xmlBlaster@marcelruff.info

Method Summary
 java.lang.String blockClientAndResetConnections()
          Prevent client login and reset all its ALIVE protocol connections.
 java.lang.String getCreationDate()
          Get date when this subject was created.
 int getMaxSessions()
          Returns the maximum allowed login sessions for this subject.
 int getNumSessions()
          Returns how many login sessions this subject currently has.
 long getNumUpdate()
          How many messages where sent to all of this clients login sessions.
 I_AdminSession getSessionByPubSessionId(long pubSessionId)
          Navigate to a session instance.
 java.lang.String getSessionList()
          Get a list of all session names for this subject.
 java.lang.String[] getSessions()
          Get a list of all session names for this subject.
 MsgUnit[] getSubjectQueueEntries(java.lang.String querySpec)
          Query the history queue, can be peeking or consuming.
 long getSubjectQueueMaxMsgs()
          Returns the maximum allowed PtP messages in this queue.
 long getSubjectQueueNumMsgs()
          Returns how many PtP messages are currently in my subject queue.
 long getUptime()
          Get elapsed seconds since this subject was created.
 boolean isBlockClientLogin()
          Prevent client from login.
 java.lang.String killClient()
          Destroy the client with all its sessions.
 java.lang.String[] peekSubjectMessages(int numOfEntries)
          Peek point to point messages from subject queue, they are not removed
 java.lang.String[] peekSubjectMessagesToFile(int numOfEntries, java.lang.String path)
          Peek messages from PtP subject queue and dump them to a file, they are not removed.
 java.lang.String setBlockClientLogin(boolean blockClient)
          Allow or prevent client login.
 void setMaxSessions(int max)
          Configure the maximum allowed login sessions for this subject.
 
Methods inherited from interface org.xmlBlaster.util.admin.I_AdminUsage
getUsageUrl, setUsageUrl, usage
 

Method Detail

getUptime

long getUptime()
Get elapsed seconds since this subject was created.


getCreationDate

java.lang.String getCreationDate()
Get date when this subject was created. This happens usually on a first login or on a first PtP message for this destination.

Returns:
The date string

getNumUpdate

long getNumUpdate()
How many messages where sent to all of this clients login sessions.

Returns:
Number of updated messages send

getSubjectQueueNumMsgs

long getSubjectQueueNumMsgs()
Returns how many PtP messages are currently in my subject queue.

Returns:
Number of messages in the queue

getSubjectQueueMaxMsgs

long getSubjectQueueMaxMsgs()
Returns the maximum allowed PtP messages in this queue.

Returns:
The max messages supported

getNumSessions

int getNumSessions()
Returns how many login sessions this subject currently has.

Returns:
Number of sessions of this subject

getMaxSessions

int getMaxSessions()
Returns the maximum allowed login sessions for this subject.

Returns:
Max. number of sessions for this subject

setMaxSessions

void setMaxSessions(int max)
Configure the maximum allowed login sessions for this subject.

Parameters:
max - The maximum number of sessions for this subject

isBlockClientLogin

boolean isBlockClientLogin()
Prevent client from login.

Returns:
true if client may not login, existing sessions are not destroyed

setBlockClientLogin

java.lang.String setBlockClientLogin(boolean blockClient)
Allow or prevent client login. Note this is for going into maintenance mode only as you can't hit this button (there is no Subject showing this button) if the client hasn't been here and is not a fail save client.

Parameters:
blockClient - true to prevent client logins

blockClientAndResetConnections

java.lang.String blockClientAndResetConnections()
Prevent client login and reset all its ALIVE protocol connections. The callback queue entries remain for fail save clients

Note this is for going into maintenance mode only as you can't hit this button (there is no Subject showing this button) if the client hasn't been here and is not a fail save client.


getSessionList

java.lang.String getSessionList()
Get a list of all session names for this subject.

Returns:
Comma separated list of sessions

getSessions

java.lang.String[] getSessions()
Get a list of all session names for this subject.

Returns:
Array of session names

getSessionByPubSessionId

I_AdminSession getSessionByPubSessionId(long pubSessionId)
Navigate to a session instance.

Parameters:
pubSessionId - The public session ID of the session to lookup
Returns:
The found session interface

killClient

java.lang.String killClient()
                            throws XmlBlasterException
Destroy the client with all its sessions.

Returns:
The list of killed sessions (public session IDs)
Throws:
XmlBlasterException

peekSubjectMessages

java.lang.String[] peekSubjectMessages(int numOfEntries)
                                       throws XmlBlasterException
Peek point to point messages from subject queue, they are not removed

Parameters:
numOfEntries - The number of messages to peek, taken from the front
Returns:
The dump of the messages
Throws:
XmlBlasterException

peekSubjectMessagesToFile

java.lang.String[] peekSubjectMessagesToFile(int numOfEntries,
                                             java.lang.String path)
                                             throws java.lang.Exception
Peek messages from PtP subject queue and dump them to a file, they are not removed.

Parameters:
numOfEntries - The number of messages to peek, taken from the front
path - The path to dump the messages to, it is automatically created if missing.
Returns:
The absolute file names dumped
Throws:
java.lang.Exception

getSubjectQueueEntries

MsgUnit[] getSubjectQueueEntries(java.lang.String querySpec)
                                 throws XmlBlasterException
Query the history queue, can be peeking or consuming.

Parameters:
keyData - Is currently unused but it is needed to be consistent with the admin get convention (i.e. either take no parameters or always take a key and a qos).
querySpec - Can be configured to be consuming e.g. "maxEntries=3&maxSize=-1&consumable=true&waitingDelay=0"
Throws:
XmlBlasterException
See Also:
The engine.qos.queryspec.QueueQuery requirement

xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.