本文整理匯總了Java中java.rmi.NotBoundException類的典型用法代碼示例。如果您正苦於以下問題:Java NotBoundException類的具體用法?Java NotBoundException怎麽用?Java NotBoundException使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
NotBoundException類屬於java.rmi包,在下文中一共展示了NotBoundException類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: destroy
import java.rmi.NotBoundException; //導入依賴的package包/類
/**
* Unbind the RMI service from the registry on bean factory shutdown.
*/
@Override
public void destroy() throws RemoteException {
if (logger.isInfoEnabled()) {
logger.info("Unbinding RMI service '" + this.serviceName +
"' from registry" + (this.createdRegistry ? (" at port '" + this.registryPort + "'") : ""));
}
try {
this.registry.unbind(this.serviceName);
}
catch (NotBoundException ex) {
if (logger.isWarnEnabled()) {
logger.warn("RMI service '" + this.serviceName + "' is not bound to registry"
+ (this.createdRegistry ? (" at port '" + this.registryPort + "' anymore") : ""), ex);
}
}
finally {
unexportObjectSilently();
}
}
示例2: setUp
import java.rmi.NotBoundException; //導入依賴的package包/類
protected boolean setUp(){
try{
setUpEV3();
setUpPorts();
setUpShooter();
return true;
} catch(RemoteException | MalformedURLException | NotBoundException e){
logger.error("Could not open ports " + e.getMessage());
try{
closePorts();
} catch(RemoteException e1){
logger.error("Error closing ports " + e1.getMessage());
}
return false;
}
}
示例3: startLocator
import java.rmi.NotBoundException; //導入依賴的package包/類
private static void startLocator(Registry registry) throws IOException, NotBoundException {
RemoteDUnitVMIF remote = (RemoteDUnitVMIF) registry.lookup("vm" + LOCATOR_VM_NUM);
final File locatorLogFile =
LOCATOR_LOG_TO_DISK ? new File("locator-" + locatorPort + ".log") : new File("");
MethExecutorResult result = remote.executeMethodOnObject(new SerializableCallable() {
public Object call() throws IOException {
Properties p = getDistributedSystemProperties();
// I never want this locator to end up starting a jmx manager
// since it is part of the unit test framework
p.setProperty("jmx-manager", "false");
//Disable the shared configuration on this locator.
//Shared configuration tests create their own locator
p.setProperty("enable-cluster-configuration", "false");
Locator.startLocatorAndDS(locatorPort, locatorLogFile, p);
return null;
}
}, "call");
if(result.getException() != null) {
RuntimeException ex = new RuntimeException("Failed to start locator", result.getException());
ex.printStackTrace();
throw ex;
}
}
示例4: inheritedChannel
import java.rmi.NotBoundException; //導入依賴的package包/類
public synchronized Channel inheritedChannel() throws IOException {
System.err.println("SP.inheritedChannel");
if (channel == null) {
channel = SocketChannel.open();
Socket socket = channel.socket();
System.err.println("socket = " + socket);
/*
* Notify test that inherited channel was created.
*/
try {
System.err.println("notify test...");
Registry registry =
LocateRegistry.getRegistry(TestLibrary.INHERITEDCHANNELNOTSERVERSOCKET_REGISTRY_PORT);
Callback obj = (Callback) registry.lookup("Callback");
obj.notifyTest();
} catch (NotBoundException nbe) {
throw (IOException)
new IOException("callback object not bound").
initCause(nbe);
}
}
return channel;
}
示例5: refresh
import java.rmi.NotBoundException; //導入依賴的package包/類
@Override
public List<? extends IModel> refresh() throws RemoteException,
ExternalServiceException, IOException, AuthenticationException,
NotBoundException, InstantiationException, IllegalAccessException {
List<Vrf> result = new ArrayList<Vrf>();
List<String> inventoryIds = new ArrayList<String>();
for (IModel target : getTargets()) {
inventoryIds.add(target.getId());
}
for (String inventoryId : inventoryIds) {
Vrf vrfModel = VrfModelCreator.createModel(VrfHandler.getVrfIfDto(inventoryId), inventoryId);
result.add((Vrf) new VplsModelDisplayNameConverter().convertModel(vrfModel));
}
return result;
}
示例6: makeListView
import java.rmi.NotBoundException; //導入依賴的package包/類
@Override
public TableInput makeListView() throws RemoteException,
AuthenticationException, InventoryException,
ExternalServiceException, IOException, NotBoundException,
InstantiationException, IllegalAccessException, ParseException {
List<? extends IModel> vlanLinkList = new ArrayList<IModel>();
for (String str : getQuery().keySet()) {
log.debug(str + " : " + getQuery().getMatcher(str).hashCode());
}
if (hasMvoIdAsKeyInQuery()) {
String mvoId = getMvoIdFromQuery();
vlanLinkList = VlanLinkHandler.getList(mvoId);
}
return getConverter().convertList(vlanLinkList);
}
示例7: makeListView
import java.rmi.NotBoundException; //導入依賴的package包/類
@Override
public TableInput makeListView() throws RemoteException,
AuthenticationException, InventoryException,
ExternalServiceException, IOException, NotBoundException,
InstantiationException, IllegalAccessException, ParseException {
List<? extends IModel> subnetList = new ArrayList<IModel>();
if (hasInventoryIdAsKeyInQuery()) {
String mvoId = getInventoryIdFromQuery();
subnetList = SubnetIpHandler.getList(getQuery(), mvoId);
} else {
subnetList = SubnetIpHandler.getList(getQuery());
}
return getConverter().convertList(subnetList);
}
示例8: build
import java.rmi.NotBoundException; //導入依賴的package包/類
public IDiagram build() throws RemoteException, InventoryException, ExternalServiceException, IOException, AuthenticationException, NotBoundException {
IDiagram diagram = new Diagram();
List<String> iRefs = new ArrayList<String>();
diagram.setPropertyValue(IPropertyConstants.PROPERTY_INVENTORY_REFS, iRefs);
diagram.setText("Whole LSP Topology");
MplsNmsInventoryConnector conn = MplsNmsInventoryConnector.getInstance();
for (RsvpLspIdPoolDto pool : conn.getRsvpLspIdPool()) {
for (RsvpLspDto lsp : pool.getUsers()) {
if (lsp.getHopSeries1() != null) {
setModelsOnHopSeries(diagram, lsp.getHopSeries1().getHops(), true);
}
if (lsp.getHopSeries2() != null) {
setModelsOnHopSeries(diagram, lsp.getHopSeries2().getHops(), false);
}
}
}
for (PhysicalLink link : this.linkCache.values()) {
setPathStyle(link);
}
return diagram;
}
示例9: Client
import java.rmi.NotBoundException; //導入依賴的package包/類
public Client(String server) throws Exception {
try {
sampleCompany = (Company) Naming.lookup("//" + server + "/meganalysis");
} catch (MalformedURLException malformedException) {
System.err.println("Bad URL: " + malformedException);
} catch (NotBoundException notBoundException) {
System.err.println("Not Bound: " + notBoundException);
} catch (RemoteException remoteException) {
System.err.println("Remote Exception: " + remoteException);
}
demo();
}
示例10: getItfAgteReactRemoto
import java.rmi.NotBoundException; //導入依賴的package包/類
public static ItfUsoAgenteReactivo getItfAgteReactRemoto(String host, String nombreAgente) throws RemoteException, NotBoundException {
// Registry regCliente = LocateRegistry.getRegistry(ip, 1099);
// ItfUsoAgenteReactivo agenteRemoto = null;
// if (regCliente == null) return null;
// else {
// agenteRemoto = (ItfUsoAgenteReactivo) regCliente.lookup(nombreAgente);
// return agenteRemoto;
// }
return getItfAgteReactRemoto (host, 1099, nombreAgente);
}
示例11: get
import java.rmi.NotBoundException; //導入依賴的package包/類
public static List<Vrf> get(String inventoryId) throws NotBoundException, AuthenticationException, IOException, ExternalServiceException {
List<Vrf> vrfList = new ArrayList<Vrf>();
for (VrfIfDto vrf : VrfExtUtil.getVrfIfDtos()) {
if (InventoryIdUtil.getInventoryId(vrf).equals(inventoryId)) {
vrfList.add(VrfModelCreator.createModel(vrf, InventoryIdUtil.getInventoryId(vrf)));
}
}
return vrfList;
}
示例12: getItfUsoRecursoRemoto
import java.rmi.NotBoundException; //導入依賴的package包/類
public static Remote getItfUsoRecursoRemoto(String identHost, String nombreRecurso) throws RemoteException, NotBoundException {
Registry regCliente = LocateRegistry.getRegistry(identHost);
InterfazGestion agenteRemoto = null;
if (regCliente == null) return null;
else
// agenteRemoto = (ItfUsoAgenteReactivo) regCliente.lookup(nombreAgente);
// return agenteRemoto;
// }
return regCliente.lookup(NombresPredefinidos.ITF_USO+nombreRecurso);
}
示例13: getList
import java.rmi.NotBoundException; //導入依賴的package包/類
public static List<PhysicalLink> getList(ObjectFilterQuery query) throws NotBoundException, AuthenticationException, IOException, ExternalServiceException {
List<PhysicalLink> linkList = new ArrayList<PhysicalLink>();
for (IpSubnetDto link : filterLinks(query, MplsNmsInventoryConnector.getInstance().getActiveIpSubnets())) {
linkList.add(LinkModelCreator.createModel(link, InventoryIdUtil.getInventoryId(link)));
}
return linkList;
}
示例14: getListUnderPseudoWire
import java.rmi.NotBoundException; //導入依賴的package包/類
public static List<LabelSwitchedPath> getListUnderPseudoWire(String pwInventoryId) throws AuthenticationException, NotBoundException, IOException, ExternalServiceException {
List<LabelSwitchedPath> lspList = new ArrayList<LabelSwitchedPath>();
for (PseudowireDto pw : MplsNmsInventoryConnector.getInstance().getDtoFacade().getPseudowires()) {
if (PseudoWireRenderer.getPseudoWireID(pw).equals(PseudoWireHandler.parseVcId(pwInventoryId))) {
appendLSPList(lspList, pw.getRsvpLsps());
}
}
return lspList;
}
示例15: getListUpperLsp
import java.rmi.NotBoundException; //導入依賴的package包/類
public static List<PseudoWire> getListUpperLsp(String lspInventoryId) throws AuthenticationException,
NotBoundException, IOException, ExternalServiceException {
List<PseudoWire> pwList = new ArrayList<PseudoWire>();
for (RsvpLspDto lsp : MplsNmsInventoryConnector.getInstance().getDtoFacade().getRsvpLsps()) {
if (InventoryIdUtil.getInventoryId(lsp).equals(lspInventoryId)) {
appendPwList(pwList, getPseudoWiresOn(lsp));
}
}
return pwList;
}