Examples of AdminService


Examples of org.apache.karaf.admin.AdminService

        Instance inst = EasyMock.createMock(Instance.class);
        inst.start("-x -y -z");
        EasyMock.expectLastCall();
        EasyMock.replay(inst);

        AdminService as = EasyMock.createMock(AdminService.class);
        EasyMock.expect(as.getInstance("test instance")).andReturn(inst);
        EasyMock.replay(as);

        AdminServiceMBeanImpl ab = new AdminServiceMBeanImpl();
        ab.setAdminService(as);
        Assert.assertSame(as, ab.getAdminService());
View Full Code Here

Examples of org.apache.karaf.admin.AdminService

        Instance inst = EasyMock.createMock(Instance.class);
        inst.start(null);
        EasyMock.expectLastCall();
        EasyMock.replay(inst);

        AdminService as = EasyMock.createMock(AdminService.class);
        EasyMock.expect(as.getInstance("test instance")).andReturn(inst);
        EasyMock.replay(as);

        AdminServiceMBeanImpl ab = new AdminServiceMBeanImpl();
        ab.setAdminService(as);
        Assert.assertSame(as, ab.getAdminService());
View Full Code Here

Examples of org.apache.lucene.gdata.server.administration.AdminService

    @SuppressWarnings("unused")
    public void processRequest(HttpServletRequest request,
            HttpServletResponse response) throws ServletException, IOException {
        super.processRequest(request, response);
        if (this.authenticated) {
            AdminService service = null;
            try {
                ServerBaseFeed feed = createFeedFromRequest(request);
                GDataAccount account = createRequestedAccount(request);

                GDataServerRegistry registry = GDataServerRegistry
                        .getRegistry();
                ServiceFactory serviceFactory = registry.lookup(
                        ServiceFactory.class, ComponentType.SERVICEFACTORY);
                if (serviceFactory == null) {
                    setError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
                            "required component is not available");
                    throw new FeedHandlerException(
                            "Can't save feed - ServiceFactory is null");
                }
                service = serviceFactory.getAdminService();
                service.createFeed(feed, account);
            } catch (ServiceException e) {
                setError(GDataResponse.SERVER_ERROR,
                        "can not create feed");
                LOG.error("Can not create feed -- " + e.getMessage(), e);
            } catch (FeedHandlerException e) {
                LOG.error("Can not create feed -- " + e.getMessage(), e);

            }catch (ParseException e) {
                LOG.error("Can not create feed -- " + e.getMessage(), e);
            }finally{
                if(service != null)
                    service.close();
            }

        }
        sendResponse(response);
    }
View Full Code Here

Examples of org.b3log.solo.jsonrpc.impl.AdminService

    /**
     * Registers remote JavaScript services.
     */
    private void registerRemoteJSServices() {
        try {
            final AdminService adminService = AdminService.getInstance();
            JSONRPCBridge.getGlobalBridge().registerObject(adminService.
                    getServiceObjectName(), adminService);

            final ArticleService articleService = ArticleService.getInstance();
            JSONRPCBridge.getGlobalBridge().registerObject(articleService.
                    getServiceObjectName(), articleService);
View Full Code Here

Examples of org.exist.soap.AdminService

    "</xu:element>" +
    "</xu:insert-after>" +
    "</xu:modifications>";
   
    public static void main( String[] args ) throws Exception {
        AdminService adminService = new AdminServiceLocator();
        Admin admin = adminService.getAdmin();
        QueryService queryService = new QueryServiceLocator();
        Query query = queryService.getQuery();
       
    String session = admin.connect("guest", "guest");
    admin.store(session, document.getBytes(UTF_8), "UTF-8", XmldbURI.ROOT_COLLECTION + "/test/notes.xml", true);
View Full Code Here

Examples of org.mule.jbi.management.AdminService

    try {
      LOGGER.info("Starting JBI");
      if (getRegistry() == null) {
        initialize();
      }
      AdminService admin = new AdminService(context);
      registerMBean(new StandardMBean(admin, AdminServiceMBean.class), createMBeanName(null, "service", "admin"));
      InstallationService install = new InstallationService(context);
      registerMBean(new StandardMBean(install, InstallationServiceMBean.class), createMBeanName(null, "service", "install"));
      DeploymentService deploy = new DeploymentService(this);
      registerMBean(new StandardMBean(deploy, DeploymentServiceMBean.class), createMBeanName(null, "service", "deploy"));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.