本文整理汇总了Java中java.rmi.RemoteException.getMessage方法的典型用法代码示例。如果您正苦于以下问题:Java RemoteException.getMessage方法的具体用法?Java RemoteException.getMessage怎么用?Java RemoteException.getMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.rmi.RemoteException
的用法示例。
在下文中一共展示了RemoteException.getMessage方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: activeVms
import java.rmi.RemoteException; //导入方法依赖的package包/类
/**
* Return the current set of monitorable Java Virtual Machines.
* <p>
* The set returned by this method depends on the user name passed
* to the constructor. If no user name was specified, then this
* method will return all candidate JVMs on the system. Otherwise,
* only the JVMs for the given user will be returned. This assumes
* that the RMI server process has the appropriate permissions to
* access the target set of JVMs.
*
* @return Set - the Set of monitorable Java Virtual Machines
*/
public Set<Integer> activeVms() throws MonitorException {
int[] active = null;
try {
active = remoteHost.activeVms();
} catch (RemoteException e) {
throw new MonitorException("Error communicating with remote host: "
+ e.getMessage(), e);
}
Set<Integer> activeSet = new HashSet<Integer>(active.length);
for (int i = 0; i < active.length; i++) {
activeSet.add(new Integer(active[i]));
}
return activeSet;
}
示例2: activeVms
import java.rmi.RemoteException; //导入方法依赖的package包/类
/**
* Return the current set of monitorable Java Virtual Machines.
* <p>
* The set returned by this method depends on the user name passed
* to the constructor. If no user name was specified, then this
* method will return all candidate JVMs on the system. Otherwise,
* only the JVMs for the given user will be returned. This assumes
* that the RMI server process has the appropriate permissions to
* access the target set of JVMs.
*
* @return Set - the Set of monitorable Java Virtual Machines
*/
public Set<Integer> activeVms() throws MonitorException {
int[] active = null;
try {
active = remoteHost.activeVms();
} catch (RemoteException e) {
throw new MonitorException("Error communicating with remote host: "
+ e.getMessage(), e);
}
Set<Integer> activeSet = new HashSet<Integer>(active.length);
for (int i = 0; i < active.length; i++) {
activeSet.add(active[i]);
}
return activeSet;
}
示例3: close
import java.rmi.RemoteException; //导入方法依赖的package包/类
@Override
public void close() {
try {
session.close();
} catch (RemoteException e) {
throw new IllegalStateException(e.getMessage(), e);
}
}
示例4: get
import java.rmi.RemoteException; //导入方法依赖的package包/类
@Override
public VarBind get(String oid) throws SocketTimeoutException,
SocketException, IOException, SnmpResponseException,
AbortedException {
try {
SerializableVarBind vb = session.get(oid);
if (vb != null) {
return vb.getVarBind();
}
return null;
} catch (RemoteException e) {
throw new IOException(e.getMessage(), e);
}
}
示例5: getCommunityString
import java.rmi.RemoteException; //导入方法依赖的package包/类
@Override
public String getCommunityString() {
try {
return session.getCommunityString();
} catch (RemoteException e) {
throw new IllegalStateException(e.getMessage(), e);
}
}
示例6: getNextChild
import java.rmi.RemoteException; //导入方法依赖的package包/类
@Override
public VarBind getNextChild(String oid) throws AbortedException,
SocketTimeoutException, SocketException, IOException,
SnmpResponseException {
try {
SerializableVarBind vb = session.getNextChild(oid);
if (vb != null) {
return vb.getVarBind();
}
return null;
} catch (RemoteException e) {
throw new IOException(e.getMessage(), e);
}
}
示例7: getSnmpAgentAddress
import java.rmi.RemoteException; //导入方法依赖的package包/类
@Override
public InetSocketAddress getSnmpAgentAddress() {
try {
return session.getSnmpAgentAddress();
} catch (RemoteException e) {
throw new IllegalStateException(e.getMessage(), e);
}
}
示例8: multiGet
import java.rmi.RemoteException; //导入方法依赖的package包/类
@Override
public Map<String, VarBind> multiGet(String[] oids)
throws SocketTimeoutException, SocketException, IOException,
SnmpResponseException, AbortedException {
try {
Map<String, SerializableVarBind> res = session.multiGet(oids);
Map<String, VarBind> result = new HashMap<String, VarBind>();
for (Map.Entry<String, SerializableVarBind> entry : res.entrySet()) {
result.put(entry.getKey(), entry.getValue().getVarBind());
}
return result;
} catch (RemoteException e) {
throw new IOException(e.getMessage(), e);
}
}
示例9: setCommunityString
import java.rmi.RemoteException; //导入方法依赖的package包/类
@Override
public void setCommunityString(String community) {
try {
session.setCommunityString(community);
} catch (RemoteException e) {
throw new IllegalStateException(e.getMessage(), e);
}
}
示例10: getSnmpRetry
import java.rmi.RemoteException; //导入方法依赖的package包/类
@Override
public int getSnmpRetry() {
try {
return session.getSnmpRetry();
} catch (RemoteException e) {
throw new IllegalStateException(e.getMessage(), e);
}
}
示例11: getSnmpTimeoutSeconds
import java.rmi.RemoteException; //导入方法依赖的package包/类
@Override
public int getSnmpTimeoutSeconds() {
try {
return session.getSnmpTimeoutSeconds();
} catch (RemoteException e) {
throw new IllegalStateException(e.getMessage(), e);
}
}
示例12: setSnmpRetry
import java.rmi.RemoteException; //导入方法依赖的package包/类
@Override
public void setSnmpRetry(int retry) {
try {
session.setSnmpRetry(retry);
} catch (RemoteException e) {
throw new IllegalStateException(e.getMessage(), e);
}
}
示例13: setSnmpTimeoutSeconds
import java.rmi.RemoteException; //导入方法依赖的package包/类
@Override
public void setSnmpTimeoutSeconds(int sec) {
try {
session.setSnmpTimeoutSeconds(sec);
} catch (RemoteException e) {
throw new IllegalStateException(e.getMessage(), e);
}
}
示例14: walk
import java.rmi.RemoteException; //导入方法依赖的package包/类
@Override
public void walk(String oid, SerializableWalkProcessor walkProcessor)
throws AbortedException, SocketTimeoutException, SocketException,
IOException, RepeatedOidException, SnmpResponseException {
try {
session.walk(oid, walkProcessor);
} catch (RemoteException e) {
throw new IllegalStateException(e.getMessage(), e);
}
}
示例15: getCachedVarbinds
import java.rmi.RemoteException; //导入方法依赖的package包/类
public List<String> getCachedVarbinds() {
try {
return session.getCachedVarbinds();
} catch (RemoteException e) {
throw new IllegalStateException(e.getMessage(), e);
}
}