当前位置: 首页>>代码示例>>Java>>正文


Java ServerNotActiveException.printStackTrace方法代码示例

本文整理汇总了Java中java.rmi.server.ServerNotActiveException.printStackTrace方法的典型用法代码示例。如果您正苦于以下问题:Java ServerNotActiveException.printStackTrace方法的具体用法?Java ServerNotActiveException.printStackTrace怎么用?Java ServerNotActiveException.printStackTrace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.rmi.server.ServerNotActiveException的用法示例。


在下文中一共展示了ServerNotActiveException.printStackTrace方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setHostResult

import java.rmi.server.ServerNotActiveException; //导入方法依赖的package包/类
@Override
public void setHostResult(HostAndCommand hostAndCommand, HostResult result) {
    try {
        Log.warning("set host result "+ hostAndCommand +" from "+ getClientHost());
    } catch (ServerNotActiveException snae) {
        snae.printStackTrace();
    }
    activeHostCommands.remove(hostAndCommand);
    incompleteHostCommands.remove(hostAndCommand);
    completeHostCommands.add(hostAndCommand);
    if (incompleteHostCommands.size() == 0) {
        try {
            pendingHostCommands.put(DONE_MARKER);
        } catch (InterruptedException ie) {
        }
        if (terminateUponCompletion) {
         if (beginTermination()) {
             displayIncomplete();
         }
        } else {
            displayIncomplete();
        }
    }
    logState();
}
 
开发者ID:Morgan-Stanley,项目名称:SilverKing,代码行数:26,代码来源:TwoLevelParallelSSHMaster.java

示例2: createSession

import java.rmi.server.ServerNotActiveException; //导入方法依赖的package包/类
@Override
public long createSession(String name, String password) throws java.rmi.RemoteException {

	try {
		validate(name, password);
	} catch (JDependException e1) {
		e1.printStackTrace();
		throw new RemoteException(e1.getMessage(), e1);
	}

	JDependSession session = new JDependSession();
	session.setId(UUID.randomUUID().getLeastSignificantBits());
	session.setUserName(name);

	try {
		session.setClient(getClientHost());
	} catch (ServerNotActiveException e) {
		e.printStackTrace();
	}
	JDependSessionMgr.getInstance().putSession(session);

	return session.getId();
}
 
开发者ID:jdepend,项目名称:cooper,代码行数:24,代码来源:JDependSessionServiceImpl.java

示例3: notifyStateChange

import java.rmi.server.ServerNotActiveException; //导入方法依赖的package包/类
/**
 * notify all clients of state change. If connection fails, this will modify
 * client hashmaps. Therefore callers should not iterate directly over the
 * clientWaitingForAgent and clientWaitingForHuman arrays.
 * 
 * @param newState
 * @throws RemoteException
 */
public void notifyStateChange(EnvironmentState newState) {
	// duplicate the set before iteration, since we may call
	// unregisterClient.
	Set<BW4TClientActions> clientset = new HashSet<>(this.clients.keySet());
	for (BW4TClientActions client : clientset) {
		try {
			client.handleStateChange(newState);
		} catch (RemoteException e) {
			reportClientProblem(client, e);
			try {
				unregisterClient(client);
			} catch (ServerNotActiveException e1) {
				e1.printStackTrace();
			}
		}

	}
}
 
开发者ID:eishub,项目名称:BW4T,代码行数:27,代码来源:BW4TServer.java

示例4: execute

import java.rmi.server.ServerNotActiveException; //导入方法依赖的package包/类
/**
 * Executes an object a specified number of times.
 *  
 * @param obj a <code>ServerExecutor</code>
 * @param times of the executions
 * @param arguments an arbitrary number of hosts
 * @return a result of the execution
 * @throws RemoteException if the remote operation fails
 */
public Object execute(ServerExecutor obj, int times, Object... arguments)
		throws RemoteException {
	if (!imInServer()) {
		try {
			System.out.println("\t\tExcecuting execute client: " + getClientHost() + " my: " + ReportIPServer.localHost());
		} catch (ServerNotActiveException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
	for (int i = 0; i < times - 1; i++) {
		obj.execute(arguments);
	}
	return obj.execute(arguments);
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:25,代码来源:RemoteExecutorImpl.java

示例5: sumMatrixAB

import java.rmi.server.ServerNotActiveException; //导入方法依赖的package包/类
public int[][] sumMatrixAB() {
    if ((m1 == null)|| (m2 == null)) {
        throw new RuntimeException("Matrix not loaded");
    }
    try {
        System.out.println("add Matrix called from "+getClientHost());
    } catch (ServerNotActiveException e) {
        e.printStackTrace();
    }
    int[][] result = new int[m1.length][m2.length];
    int i, j;
    for (i = 0; i < m1.length; i++) {
        for (j = 0; j < m2.length; j++) {
            result [i][j] = m1 [i][j] + m2 [i][j];
        }
    }
    System.out.println("Result Matrix (add)");
    System.out.println(Arrays.toString(result[0]));
    System.out.println(Arrays.toString(result[1]));
    System.out.println();
    return result;
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:23,代码来源:RemoteCalculator.java

示例6: sumMatrixAB

import java.rmi.server.ServerNotActiveException; //导入方法依赖的package包/类
public BigInteger[][] sumMatrixAB() {
    if ((m1 == null)|| (m2 == null)) {
        throw new RuntimeException("Matrix not loaded");
    }

    try {
        System.out.println("add Matrix called from "+getClientHost());
    } catch (ServerNotActiveException e) {
        e.printStackTrace();
    }
    BigInteger[][] result = new BigInteger[m1.length][m2.length];

    int i, j;
    for (i = 0; i < m1.length; i++) {
        for (j = 0; j < m2.length; j++) {
            result [i][j] = m1 [i][j].add(m2 [i][j]);
        }
    }
    System.out.println("Result Matrix (add)");
    System.out.println(Arrays.toString(result[0]));
    System.out.println(Arrays.toString(result[1]));
    System.out.println();
    return result;
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:25,代码来源:RemoteCalculatorBI.java

示例7: sumMatrixAB

import java.rmi.server.ServerNotActiveException; //导入方法依赖的package包/类
public int[][] sumMatrixAB() {
    if ((m1 == null) || (m2 == null)) {
        throw new RuntimeException("Matrix not loaded");
    }
    try {
        System.out.println("add Matrix called from " + getClientHost());
    } catch (ServerNotActiveException e) {
        e.printStackTrace();
    }
    int[][] result = new int[m1.length][m2.length];
    int i, j;
    for (i = 0; i < m1.length; i++) {
        for (j = 0; j < m2.length; j++) {
            result[i][j] = m1[i][j] + m2[i][j];
        }
    }
    System.out.println("Result Matrix (add)");
    System.out.println(Arrays.toString(result[0]));
    System.out.println(Arrays.toString(result[1]));
    System.out.println();
    return result;
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:23,代码来源:RemoteCalculator.java

示例8: sumMatrixAB

import java.rmi.server.ServerNotActiveException; //导入方法依赖的package包/类
public BigInteger[][] sumMatrixAB() {
    if ((m1 == null) || (m2 == null)) {
        throw new RuntimeException("Matrix not loaded");
    }

    try {
        System.out.println("add Matrix called from " + getClientHost());
    } catch (ServerNotActiveException e) {
        e.printStackTrace();
    }
    BigInteger[][] result = new BigInteger[m1.length][m2.length];

    int i, j;
    for (i = 0; i < m1.length; i++) {
        for (j = 0; j < m2.length; j++) {
            result[i][j] = m1[i][j].add(m2[i][j]);
        }
    }
    System.out.println("Result Matrix (add)");
    System.out.println(Arrays.toString(result[0]));
    System.out.println(Arrays.toString(result[1]));
    System.out.println();
    return result;
}
 
开发者ID:freeVM,项目名称:freeVM,代码行数:25,代码来源:RemoteCalculatorBI.java

示例9: workerComplete

import java.rmi.server.ServerNotActiveException; //导入方法依赖的package包/类
@Override
public void workerComplete() throws RemoteException {
    try {
        Log.warning("worker complete  from "+ getClientHost());
    } catch (ServerNotActiveException snae) {
        snae.printStackTrace();
    }
    completedWorkers.release();
    Log.warning("Worker complete: ", completedWorkers.availablePermits());
}
 
开发者ID:Morgan-Stanley,项目名称:SilverKing,代码行数:11,代码来源:TwoLevelParallelSSHMaster.java

示例10: sayHello

import java.rmi.server.ServerNotActiveException; //导入方法依赖的package包/类
public String sayHello() throws RemoteException {
 		try {
	System.out.println("LOG: "+ ServidorHola.class.getName()
                  + ": registra(): "+ getClientHost() );
} catch (ServerNotActiveException e) {
	e.printStackTrace();
}
       return "Hola, mundo!";
}
 
开发者ID:garciparedes,项目名称:PracticasSistemasDistribuidos,代码行数:10,代码来源:ServidorHola.java

示例11: saluda

import java.rmi.server.ServerNotActiveException; //导入方法依赖的package包/类
public String saluda(String nombre)  throws RemoteException {
    String ip=null;
    try {
        ip = this.getClientHost();
    } catch (ServerNotActiveException snae) {
        snae.printStackTrace(System.err);
    }
    listado.put(ip, nombre);
    return (String) ("Hola, "+nombre+" !");
}
 
开发者ID:garciparedes,项目名称:PracticasSistemasDistribuidos,代码行数:11,代码来源:HolaImpl.java

示例12: save

import java.rmi.server.ServerNotActiveException; //导入方法依赖的package包/类
public int save(comments p) throws ClassNotFoundException {
    try {
	      System.out.println("Invoke update from " + getClientHost());
	    } catch (ServerNotActiveException snae) {
	      snae.printStackTrace();
	    }
	    return CommentsRepository.save(p);
}
 
开发者ID:etingi01,项目名称:JavaRMIhospital,代码行数:9,代码来源:CommentsObject.java

示例13: update

import java.rmi.server.ServerNotActiveException; //导入方法依赖的package包/类
public int update(comments p) throws ClassNotFoundException {
  try {
    System.out.println("Invoke update from " + getClientHost());
  } catch (ServerNotActiveException snae) {
    snae.printStackTrace();
  }
  return CommentsRepository.update(p);
}
 
开发者ID:etingi01,项目名称:JavaRMIhospital,代码行数:9,代码来源:CommentsObject.java

示例14: findById

import java.rmi.server.ServerNotActiveException; //导入方法依赖的package包/类
public ArrayList<comments> findById(int criteria) throws ClassNotFoundException{
try {
    System.out.println("Invoke findAll from " + getClientHost());
  } catch (ServerNotActiveException snae) {
    snae.printStackTrace();
  }
  return CommentsRepository.findById(criteria);
}
 
开发者ID:etingi01,项目名称:JavaRMIhospital,代码行数:9,代码来源:CommentsObject.java

示例15: findByDoctor

import java.rmi.server.ServerNotActiveException; //导入方法依赖的package包/类
public ArrayList<comments> findByDoctor(String criteria) throws ClassNotFoundException{
try {
    System.out.println("Invoke findAll from " + getClientHost());
  } catch (ServerNotActiveException snae) {
    snae.printStackTrace();
  }
  return CommentsRepository.findByDoctor(criteria);
}
 
开发者ID:etingi01,项目名称:JavaRMIhospital,代码行数:9,代码来源:CommentsObject.java


注:本文中的java.rmi.server.ServerNotActiveException.printStackTrace方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。