| 1 52 53 package com.go.teaservlet.util.cluster; 54 55 import java.rmi.Remote ; 56 import java.rmi.RemoteException ; 57 58 66 public class TeaServletClusterHook extends ClusterHook 67 implements Restartable { 68 69 Restartable mRestartable; 70 71 public TeaServletClusterHook(Restartable restart, 72 String clusterName, 73 String serverName) 74 throws RemoteException { 75 76 super(clusterName, serverName); 77 mRestartable = restart; 78 } 79 80 public String getStatus(Object paramObj) throws RemoteException { 81 82 if (mRestartable != null) { 83 return mRestartable.getStatus(paramObj); 84 } 85 else { 86 return "No Status report available"; 87 } 88 } 89 90 public boolean restart(Object paramObj) throws RemoteException { 91 92 if (mRestartable != null) { 93 return mRestartable.restart(paramObj); 94 } 95 else { 96 return false; 97 } 98 } 99 } 100 | Popular Tags |