Package org.rioproject.admin

Examples of org.rioproject.admin.MonitorableService


     * the ServiceLeaseManager
     */
    protected ServiceMonitor getServiceMonitor() throws Exception {
        ServiceMonitor monitor = null;
        if(proxy instanceof MonitorableService) {
            MonitorableService service = (MonitorableService)proxy;
            Lease lease = service.monitor(leaseDuration);
            lease = (Lease)leasePreparer.prepareProxy(lease);
            serviceMonitor = new ServiceLeaseManager(lease);
        } else {
            logger.info("Service ["+proxy.getClass().getName()+"] not an "+
                        "instanceof "+MonitorableService.class.getName()+", "+
View Full Code Here


            try {
                /*
                 * Invoke the service. If the service isnt active we'll get a
                 * RemoteException
                 */
                MonitorableService service = (MonitorableService)proxy;
                service.ping();
                verified = true;
            } catch(RemoteException e) {
                if(logger.isTraceEnabled())
                    logger.trace("RemoteException reaching service, "+
                                  "service cannot be reached");
View Full Code Here

                                                      + proxy.getClass().getName()
                                                      + ", attempt "
                                                      + "["
                                                      + i
                                                      + "]");
                                    MonitorableService service =
                                        (MonitorableService)proxy;
                                    t0 = System.currentTimeMillis();
                                    this.lease = service.monitor(leaseDuration);
                                    if(logger.isTraceEnabled())
                                        logger.trace("Re-established Lease to : "
                                                      + proxy.getClass().getName());
                                    connected = true;
                                    break;
View Full Code Here

     */
    protected ServiceMonitor getServiceMonitor() throws Exception {               
        if(proxy instanceof MonitorableService) {
            if(serverSocket != null) {
                heartbeatManager = new HeartbeatManager();
                MonitorableService service = (MonitorableService)proxy;
                try {
                    service.startHeartbeat(monitorableConfig);
                } catch(Exception e) {
                    //notifyListeners();
                    throw e;
                }
            } else {
View Full Code Here

TOP

Related Classes of org.rioproject.admin.MonitorableService

Copyright © 2018 www.massapicom. 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.