org.jboss.osgi.testing.internal
Class ClipboardImpl

java.lang.Object
  extended by javax.management.StandardMBean
      extended by org.jboss.osgi.testing.internal.ClipboardImpl
All Implemented Interfaces:
DynamicMBean, MBeanRegistration, ClipboardMBean

public class ClipboardImpl
extends StandardMBean
implements ClipboardMBean

An implementation of a simple clipboard.

Since:
20-Apr-2010
Author:
thomas.diesler@jboss.com

Field Summary
 
Fields inherited from interface org.jboss.osgi.testing.ClipboardMBean
OBJECTNAME
 
Constructor Summary
ClipboardImpl()
           
 
Method Summary
 void addMessage(String message)
          Add a message to the clipboard
 void clearMessages()
          Clear the messages on the clipboard.
 String getLastMessage()
          Get the last message added to the list.
 String getMessage(int index)
          Get the message at the given index.
 int getMessageCount()
          Get the current message count.
 List<String> getMessages()
          Get the unmodifieable list of clipboard messages
 String removeMessage(int index)
          Remove the message at the given index.
 
Methods inherited from class javax.management.StandardMBean
cacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getImpact, getImplementation, getImplementationClass, getMBeanInfo, getMBeanInterface, getParameterName, getParameterName, invoke, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributes, setImplementation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClipboardImpl

public ClipboardImpl()
              throws NotCompliantMBeanException
Throws:
NotCompliantMBeanException
Method Detail

addMessage

public void addMessage(String message)
Description copied from interface: ClipboardMBean
Add a message to the clipboard

Specified by:
addMessage in interface ClipboardMBean

getMessages

public List<String> getMessages()
Description copied from interface: ClipboardMBean
Get the unmodifieable list of clipboard messages

Specified by:
getMessages in interface ClipboardMBean

getMessageCount

public int getMessageCount()
Description copied from interface: ClipboardMBean
Get the current message count.

Specified by:
getMessageCount in interface ClipboardMBean

getMessage

public String getMessage(int index)
Description copied from interface: ClipboardMBean
Get the message at the given index.

Specified by:
getMessage in interface ClipboardMBean

getLastMessage

public String getLastMessage()
Description copied from interface: ClipboardMBean
Get the last message added to the list.

Specified by:
getLastMessage in interface ClipboardMBean

removeMessage

public String removeMessage(int index)
Description copied from interface: ClipboardMBean
Remove the message at the given index.

Specified by:
removeMessage in interface ClipboardMBean

clearMessages

public void clearMessages()
Description copied from interface: ClipboardMBean
Clear the messages on the clipboard.

Specified by:
clearMessages in interface ClipboardMBean


Copyright © 2010. All Rights Reserved.