org.fusesource.web.console.server
Class AgentServiceImpl

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.google.gwt.user.server.rpc.RemoteServiceServlet
              extended by org.fusesource.web.console.server.AgentServiceImpl
All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService, com.google.gwt.user.server.rpc.SerializationPolicyProvider, java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, AgentService

public class AgentServiceImpl
extends com.google.gwt.user.server.rpc.RemoteServiceServlet
implements AgentService

handles remote call implementation

Version:
$Revision: 1.1 $
See Also:
Serialized Form

Constructor Summary
AgentServiceImpl()
           
 
Method Summary
 void copyMessages(java.lang.String objectName, java.util.List<java.lang.String> messageIDList, java.lang.String destinationQueueName)
           
 MBeanAttribute createMBeanAttribute(javax.management.MBeanAttributeInfo info, java.lang.Object value)
           
 MBeanOperation createMBeanOperation(javax.management.MBeanOperationInfo info)
           
 java.lang.String[] createTreePath(javax.management.ObjectName objectName)
           
 void deleteMessages(java.lang.String objectName, java.util.List<java.lang.String> messageIDList)
           
protected  void doUnexpectedFailure(java.lang.Throwable throwable)
           
 javax.management.MBeanServer findMBeanServer()
           
 MBeanAttribute[] getAttributes(java.lang.String objectName)
           
 MBeanAttribute[][] getAttributes(java.lang.String[] objectNames)
           
 MBeanAttribute[][] getAttributes(java.lang.String[] objectNames, MBeanAttribute[] attributes)
           
 java.util.List getDestinationMessages(java.lang.String destinationName)
           
 LogResults getLogEvents(LogFilter filter)
           
 LogFile[] getLogFiles()
           
 SearchResults getLogs(java.lang.String file, java.lang.String level, int maxResult, boolean includeStacks)
           
 MBeanAttribute[] getMBeanInfo(javax.management.ObjectName objectName)
           
 MBeanName[] getMBeans()
           
 MBeanName[] getMBeans(java.lang.String filter, java.util.List folderPaths)
           
 javax.management.MBeanServer getMbeanServer()
           
 MBeanOperation[] getOperations(java.lang.String name)
           
 void installOsgiBundle(java.lang.String url)
           
 java.lang.String invoke(java.lang.String name, java.lang.String operationName, java.lang.String[] params, java.lang.String[] signature)
           
 OsgiBundle[] listOsgiBundle()
           
 void moveMessages(java.lang.String objectName, java.util.List<java.lang.String> messageIDList, java.lang.String destinationQueueName)
           
 boolean moveMessageTo(java.lang.String messageId, java.lang.String destinationSource, java.lang.String targetDestination)
           
 AgentServiceAsync newInstance()
           
 int retryMessages(java.lang.String objectName, java.util.List<java.lang.String> messageIDList)
           
 java.lang.String sendMessage(java.lang.String destinationName, DestinationMessage message)
          Sends a text message to the given destination MBean name with the given headers and body
 void setMbeanServer(javax.management.MBeanServer mbeanServer)
           
 void startOsgiBundle(long id)
           
 void stopOsgiBundle(long id)
           
 java.lang.String toString(java.lang.Object value)
           
 void uninstallOsgiBundle(long id)
           
 
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
doGetSerializationPolicy, doPost, getSerializationPolicy, getThreadLocalRequest, getThreadLocalResponse, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, shouldCompressResponse
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgentServiceImpl

public AgentServiceImpl()
Method Detail

createMBeanAttribute

public MBeanAttribute createMBeanAttribute(javax.management.MBeanAttributeInfo info,
                                           java.lang.Object value)

createMBeanOperation

public MBeanOperation createMBeanOperation(javax.management.MBeanOperationInfo info)

createTreePath

public java.lang.String[] createTreePath(javax.management.ObjectName objectName)

findMBeanServer

public javax.management.MBeanServer findMBeanServer()

getAttributes

public MBeanAttribute[] getAttributes(java.lang.String objectName)
Specified by:
getAttributes in interface AgentService

getAttributes

public MBeanAttribute[][] getAttributes(java.lang.String[] objectNames)
Specified by:
getAttributes in interface AgentService

getAttributes

public MBeanAttribute[][] getAttributes(java.lang.String[] objectNames,
                                        MBeanAttribute[] attributes)
Specified by:
getAttributes in interface AgentService

getDestinationMessages

public java.util.List getDestinationMessages(java.lang.String destinationName)
Specified by:
getDestinationMessages in interface AgentService

getLogFiles

public LogFile[] getLogFiles()
Specified by:
getLogFiles in interface AgentService

getLogs

public SearchResults getLogs(java.lang.String file,
                             java.lang.String level,
                             int maxResult,
                             boolean includeStacks)
Specified by:
getLogs in interface AgentService

getMBeanInfo

public MBeanAttribute[] getMBeanInfo(javax.management.ObjectName objectName)
                              throws javax.management.ReflectionException,
                                     javax.management.InstanceNotFoundException,
                                     javax.management.IntrospectionException
Throws:
javax.management.ReflectionException
javax.management.InstanceNotFoundException
javax.management.IntrospectionException

getMBeans

public MBeanName[] getMBeans()
Specified by:
getMBeans in interface AgentService

getMBeans

public MBeanName[] getMBeans(java.lang.String filter,
                             java.util.List folderPaths)
Specified by:
getMBeans in interface AgentService

getMbeanServer

public javax.management.MBeanServer getMbeanServer()

getOperations

public MBeanOperation[] getOperations(java.lang.String name)
Specified by:
getOperations in interface AgentService

invoke

public java.lang.String invoke(java.lang.String name,
                               java.lang.String operationName,
                               java.lang.String[] params,
                               java.lang.String[] signature)
                        throws java.lang.Exception
Specified by:
invoke in interface AgentService
Throws:
java.lang.Exception

newInstance

public AgentServiceAsync newInstance()

setMbeanServer

public void setMbeanServer(javax.management.MBeanServer mbeanServer)

toString

public java.lang.String toString(java.lang.Object value)

installOsgiBundle

public void installOsgiBundle(java.lang.String url)
                       throws AgentServiceException
Specified by:
installOsgiBundle in interface AgentService
Throws:
AgentServiceException

listOsgiBundle

public OsgiBundle[] listOsgiBundle()
                            throws AgentServiceException
Specified by:
listOsgiBundle in interface AgentService
Throws:
AgentServiceException

startOsgiBundle

public void startOsgiBundle(long id)
                     throws AgentServiceException
Specified by:
startOsgiBundle in interface AgentService
Throws:
AgentServiceException

stopOsgiBundle

public void stopOsgiBundle(long id)
                    throws AgentServiceException
Specified by:
stopOsgiBundle in interface AgentService
Throws:
AgentServiceException

uninstallOsgiBundle

public void uninstallOsgiBundle(long id)
                         throws AgentServiceException
Specified by:
uninstallOsgiBundle in interface AgentService
Throws:
AgentServiceException

moveMessageTo

public boolean moveMessageTo(java.lang.String messageId,
                             java.lang.String destinationSource,
                             java.lang.String targetDestination)
Specified by:
moveMessageTo in interface AgentService

sendMessage

public java.lang.String sendMessage(java.lang.String destinationName,
                                    DestinationMessage message)
                             throws java.lang.Exception
Description copied from interface: AgentService
Sends a text message to the given destination MBean name with the given headers and body

Specified by:
sendMessage in interface AgentService
Throws:
java.lang.Exception

deleteMessages

public void deleteMessages(java.lang.String objectName,
                           java.util.List<java.lang.String> messageIDList)
                    throws java.lang.Exception
Specified by:
deleteMessages in interface AgentService
Throws:
java.lang.Exception

copyMessages

public void copyMessages(java.lang.String objectName,
                         java.util.List<java.lang.String> messageIDList,
                         java.lang.String destinationQueueName)
                  throws java.lang.Exception
Specified by:
copyMessages in interface AgentService
Throws:
java.lang.Exception

moveMessages

public void moveMessages(java.lang.String objectName,
                         java.util.List<java.lang.String> messageIDList,
                         java.lang.String destinationQueueName)
                  throws java.lang.Exception
Specified by:
moveMessages in interface AgentService
Throws:
java.lang.Exception

retryMessages

public int retryMessages(java.lang.String objectName,
                         java.util.List<java.lang.String> messageIDList)
                  throws java.lang.Exception
Specified by:
retryMessages in interface AgentService
Throws:
java.lang.Exception

getLogEvents

public LogResults getLogEvents(LogFilter filter)
Specified by:
getLogEvents in interface AgentService

doUnexpectedFailure

protected void doUnexpectedFailure(java.lang.Throwable throwable)
Overrides:
doUnexpectedFailure in class com.google.gwt.user.server.rpc.RemoteServiceServlet


Copyright © 2009 FuseSource. All Rights Reserved.