本文整理汇总了Java中java.rmi.RemoteException类的典型用法代码示例。如果您正苦于以下问题:Java RemoteException类的具体用法?Java RemoteException怎么用?Java RemoteException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RemoteException类属于java.rmi包,在下文中一共展示了RemoteException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: makeFilteringFieldsView
import java.rmi.RemoteException; //导入依赖的package包/类
public List<FilterQueryContext> makeFilteringFieldsView() throws RemoteException, IOException, ExternalServiceException {
List<FilterQueryContext> result = new ArrayList<FilterQueryContext>();
List<String> fields = getConfig().getFilteringFields();
Properties conditions = getConfig().getConditionOfFiltering();
Properties displayNames = getConfig().getDisplayNames();
for (String field : fields) {
FilterQueryContext context = new FilterQueryContext();
context.setMatcherClass(getMatcherClass(conditions.getProperty(field)));
context.setDisplayName(displayNames.getProperty(field));
context.setName(field);
context.setEditorName(getEditorName(conditions.getProperty(field)));
if (context.getEditorName() != null) {
setProposals(field, context);
}
result.add(context);
}
return result;
}
示例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(new Integer(active[i]));
}
return activeSet;
}
示例3: activate
import java.rmi.RemoteException; //导入依赖的package包/类
synchronized MarshalledObject<? extends Remote>
activate(ActivationID id,
boolean force,
ActivationInstantiator inst)
throws RemoteException, ActivationException
{
MarshalledObject<? extends Remote> nstub = stub;
if (removed) {
throw new UnknownObjectException("object removed");
} else if (!force && nstub != null) {
return nstub;
}
nstub = inst.newInstance(id, desc);
stub = nstub;
/*
* stub could be set to null by a group reset, so return
* the newstub here to prevent returning null.
*/
return nstub;
}
示例4: serviceStarted
import java.rmi.RemoteException; //导入依赖的package包/类
@Override protected void serviceStarted() {
super.serviceStarted();
String rmiServiceName = System.getProperty(PROPERTYNAME_RMISERVICENAME);
if (rmiServiceName == null) {
throw new IllegalStateException("system property '" + PROPERTYNAME_RMISERVICENAME+ "' を設定してください.");
}
try {
TefService.instance().getRmiRegistry().bind(rmiServiceName, new MplsnmsRmiServiceAccessPoint.Impl());
} catch (RemoteException re) {
throw new RuntimeException(re);
} catch (AlreadyBoundException abe) {
throw new RuntimeException(abe);
}
NaefTefService.instance().getRmcServerService()
.registerMethod(AllocateVlanIpsubnetaddr.Call.class, new AllocateVlanIpsubnetaddr.Exec());
}
示例5: FldBase64URN
import java.rmi.RemoteException; //导入依赖的package包/类
/**
* Construct and attach to the specified mbo value
* @throws RemoteException
*/
public FldBase64URN(
MboValue mbv
)
throws MXException, RemoteException
{
super( mbv );
String query = "(" + Constants.FIELD_SITEID + " = :" + Model.FIELD_SITEID + " OR " + Model.FIELD_SITEID + " IS NULL )"
+ " AND (" + Constants.FIELD_ORGID + " = :" + Model.FIELD_ORGID + " OR " + Model.FIELD_ORGID + " IS NULL )";
String thisAttr = getMboValue().getAttributeName() ;
setRelationship( Viewable.TABLE_NAME, query );
setLookupKeyMapInOrder(
new String[] { thisAttr, BuildingModel.FIELD_URL, BuildingModel.FIELD_PARAMNAME, BuildingModel.FIELD_DESCRIPTION,
BuildingModel.FIELD_LONGDESCRIPTION }
,
new String[] { Viewable.FIELD_OBJECTKEY, Viewable.FIELD_BASE64URN, Viewable.FIELD_OBJECTKEY, Viewable.FIELD_DESCRIPTION,
Viewable.FIELD_LONGDESCRIPTION }
);
setListCriteria( query );
}
示例6: UnicastServerRef
import java.rmi.RemoteException; //导入依赖的package包/类
@Test(dataProvider = "bindData")
public void UnicastServerRef(String name, Object obj, int expectedFilterCount) throws RemoteException {
try {
RemoteImpl impl = RemoteImpl.create();
UnicastServerRef ref = new UnicastServerRef(new LiveRef(0), impl.checker);
Echo client = (Echo) ref.exportObject(impl, null, false);
int count = client.filterCount(obj);
System.out.printf("count: %d, obj: %s%n", count, obj);
Assert.assertEquals(count, expectedFilterCount, "wrong number of filter calls");
} catch (RemoteException rex) {
if (expectedFilterCount == -1 &&
UnmarshalException.class.equals(rex.getCause().getClass()) &&
InvalidClassException.class.equals(rex.getCause().getCause().getClass())) {
return; // normal expected exception
}
rex.printStackTrace();
Assert.fail("unexpected remote exception", rex);
} catch (Exception ex) {
Assert.fail("unexpected exception", ex);
}
}
示例7: populateNode
import java.rmi.RemoteException; //导入依赖的package包/类
private void populateNode() throws ExternalServiceException, IOException, RemoteException {
ListView<NodeDto> list = new ListView<NodeDto>("nodeList", this.model) {
private static final long serialVersionUID = 1L;
@Override
protected void populateItem(ListItem<NodeDto> item) {
NodeDto node = item.getModelObject();
BookmarkablePageLink<Void> link = NodePageUtil.createNodeLink("nodeLink", node);
item.add(link);
}
};
add(list);
WebMarkupContainer container = new WebMarkupContainer("nodeBlock");
add(container);
container.setVisible(this.model.isVisible());
}
示例8: executeQuery
import java.rmi.RemoteException; //导入依赖的package包/类
private String executeQuery() throws RemoteException {
lastQueryTime = LocalDateTime.now().atZone(ZoneId.systemDefault());
String query = "";
setOptionsIn("");
try {
if (getVersion().toString().equals("1.3.1.1")) {
query = getQuery("/1311/GetTrajectoryData.xml");
} else if (getVersion().toString().equals("1.4.1.1")) {
query = getQuery("/1411/GetTrajectoryData.xml");
setOptionsIn("dataVersion=1.4.1.1");
}
} catch (Exception ex) {
System.out.println("Error in getQuery ex : " + ex);
}
query = query.replace("%uidWell%", wellId);
query = query.replace("%uidWellbore%", wellboreId);
query = query.replace("%uidTrajectory%", trajectoryId);
query = query.replace("%mdMn%", getQueryStartMd());
setQuery(query);
setCapabilitesIn("");
return witsmlClient.executeTrajectoryQuery(getQuery(), getOptionsIn(), getCapabilitiesIn());
}
示例9: getSessionCounter
import java.rmi.RemoteException; //导入依赖的package包/类
public SessionCounter getSessionCounter(String registryHost) {
SessionCounter sessionCounter = null;
/* ottiene la factory del session counter */
SessionCounterFactory sessionCounterFactory = getSessionCounterFactory(registryHost);
/* ora ottiene un riferimento al servizio remoto */
try {
logger.info("ServiceFactory: Getting a session counter from the factory");
sessionCounter = sessionCounterFactory.getSessionCounter();
int counterId = sessionCounter.getId();
logger.info(
"ServiceFactory: Obtained a new session counter from the factory: "
+ "SessionCounter[" + counterId + "]"
);
} catch (RemoteException e) {
logger.info("ServiceFactory: RemoteException: " + e.getMessage());
}
return sessionCounter;
}
示例10: action
import java.rmi.RemoteException; //导入依赖的package包/类
/**
* Sets the orgid in the table that is referenced for the site selected.
*/
@Override
public void action()
throws MXException,
RemoteException
{
super.action();
String URL = getMboValue().getString();
Mbo mbo = getMboValue().getMbo();
String bucketKey = DataRESTAPI.bucketFromBase64URN( URL );
mbo.setValue( Bucket.FIELD_BUCKETKEYFULL, bucketKey, NOACCESSCHECK );
}
示例11: copyResult
import java.rmi.RemoteException; //导入依赖的package包/类
public Object copyResult( Object result, ORB orb ) throws RemoteException
{
if (needsResultCopy)
return Util.copyObject( result, orb ) ;
else
return result ;
}
示例12: mapSystemException
import java.rmi.RemoteException; //导入依赖的package包/类
/**
* Maps a SystemException to a RemoteException.
* @param ex the SystemException to map.
* @return the mapped exception.
*/
public static RemoteException mapSystemException(SystemException ex) {
if (utilDelegate != null) {
return utilDelegate.mapSystemException(ex);
}
return null;
}
示例13: simpleDepthBuiltinNonRejectable
import java.rmi.RemoteException; //导入依赖的package包/类
@Test
public void simpleDepthBuiltinNonRejectable() throws RemoteException, AlreadyBoundException, NotBoundException {
int depthOverride = Integer.getInteger("test.maxdepth", REGISTRY_MAX_DEPTH);
depthOverride = Math.min(depthOverride, REGISTRY_MAX_DEPTH);
System.out.printf("overrideDepth: %d, filter: %s%n", depthOverride, registryFilter);
try {
String name = "reject2";
DepthRejectableClass r1 = DepthRejectableClass.create(depthOverride);
registry.bind(name, r1);
registry.unbind(name);
} catch (Exception rex) {
Assert.fail("Registry filter should not have rejected depth: "
+ depthOverride);
}
}
示例14: makeModelValidator
import java.rmi.RemoteException; //导入依赖的package包/类
@Override
public ModelValidator makeModelValidator(
BIMProjectRemote projectMbo,
ModelLoaderOptions options,
ProgressLogger<ItemFACILITY> logger ) throws RemoteException, MXException
{
System.out.println( "Ext Factry: makeModelValidator" );
return super.makeModelValidator( projectMbo, options, logger );
}
示例15: rebind
import java.rmi.RemoteException; //导入依赖的package包/类
public void rebind(String name, Remote obj)
throws RemoteException, AccessException
{
if (name.equals(NAME)) {
throw new AccessException(
"binding ActivationSystem is disallowed");
} else {
super.rebind(name, obj);
}
}