本文整理了Java中java.rmi.RemoteException.getLocalizedMessage
方法的一些代码示例,展示了RemoteException.getLocalizedMessage
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RemoteException.getLocalizedMessage
方法的具体详情如下:
包路径:java.rmi.RemoteException
类名称:RemoteException
方法名:getLocalizedMessage
暂无
代码示例来源:origin: stackoverflow.com
public static void main(String[] args) throws Exception {
Remoteserver objremoteserver=new Remoteserver();
objremoteserver.setmsg("Hello! How are you?");
System.out.println(objremoteserver.getmsg());
try
{
Naming.rebind("Remotemethod", objremoteserver);
System.out.println("Server Started");
}
catch(RemoteException re)
{
System.out.println(re.getLocalizedMessage());
}
finally
{
System.out.println("Unknown Exception Occured!!!!");
}
}
代码示例来源:origin: org.apache.airavata/airavata-xbaya-gui
public MsgBoxWsaResponsesCorrelator(String msgBoxServiceLoc,AsynchronousInvoker output)
throws DynamicInfosetProcessorException
{
this.invoker = output;
this.msgBoxServiceLoc = msgBoxServiceLoc;
msgBoxClient = new MsgBoxClient();
try {
msgBoxAddr = msgBoxClient.createMessageBox(msgBoxServiceLoc,5000L);
try {
setReplyTo(new WsaEndpointReference(new URI(msgBoxAddr.getAddress())));
} catch (URISyntaxException e) {
logger.error(e.getLocalizedMessage(),e); //To change body of catch statement use File | Settings | File Templates.
}
messageBoxDonwloader = new Thread(this, Thread.currentThread().getName()+"-async-msgbox-correlator");
messageBoxDonwloader.setDaemon(true);
messageBoxDonwloader.start();
} catch (RemoteException e) {
logger.error(e.getLocalizedMessage(),e); //To change body of catch statement use File | Settings | File Templates.
}
}
代码示例来源:origin: org.apache.airavata/airavata-workflow-engine
public MsgBoxWsaResponsesCorrelator(String msgBoxServiceLoc,AsynchronousInvoker output)
throws DynamicInfosetProcessorException
{
this.invoker = output;
this.msgBoxServiceLoc = msgBoxServiceLoc;
msgBoxClient = new MsgBoxClient();
try {
msgBoxAddr = msgBoxClient.createMessageBox(msgBoxServiceLoc,5000L);
try {
setReplyTo(new WsaEndpointReference(new URI(msgBoxAddr.getAddress())));
} catch (URISyntaxException e) {
logger.error(e.getLocalizedMessage(),e); //To change body of catch statement use File | Settings | File Templates.
}
messageBoxDonwloader = new Thread(this, Thread.currentThread().getName()+"-async-msgbox-correlator");
messageBoxDonwloader.setDaemon(true);
messageBoxDonwloader.start();
} catch (RemoteException e) {
logger.error(e.getLocalizedMessage(),e); //To change body of catch statement use File | Settings | File Templates.
}
}
代码示例来源:origin: org.n52.metadata/smarteditor-api
throw new ConfigurationException(e.getLocalizedMessage(), e);
} catch (RemoteException e) {
LOG.error(e.getLocalizedMessage());
throw new InvokerException(e.getLocalizedMessage(), e);
} catch (Throwable e) {
LOG.error(e.getLocalizedMessage());
代码示例来源:origin: org.jbundle.base/org.jbundle.base.mixed
/**
* Sent/send this return string.
* @param out The return output stream.
* @param strReturn The string to return.
*/
public void setErrorReturn(PrintWriter out, RemoteException ex)
throws RemoteException
{
out.println(Utility.startTag(XMLTags.STATUS_TEXT));
String strMessage = ex.getLocalizedMessage();
if (Utility.isNumeric(strMessage))
{
try {
int iErrorCode = Integer.parseInt(strMessage);
out.println(Utility.startTag(XMLTags.ERROR_CODE) + strMessage + Utility.endTag(XMLTags.ERROR_CODE));
if (this.getTask() != null)
if (this.getTask().getApplication() != null)
strMessage = this.getTask().getApplication().getSecurityErrorText(iErrorCode);
} catch (NumberFormatException ex2) {
// Ignore
}
}
out.println(Utility.startTag(XMLTags.TEXT) + strMessage + Utility.endTag(XMLTags.TEXT));
out.println(Utility.startTag(XMLTags.ERROR) + "error" + Utility.endTag(XMLTags.ERROR));
out.println(Utility.endTag(XMLTags.STATUS_TEXT));
return;
}
/**
代码示例来源:origin: org.apache.geronimo.ext.openejb/openejb-client
public void authenticate(String userID, String psswrd) throws AuthenticationException {
// May be null
String realmName = (String) env.get("openejb.authentication.realmName");
AuthenticationRequest req = new AuthenticationRequest(realmName, userID, psswrd);
AuthenticationResponse res = null;
try {
res = requestAuthorization(req);
} catch (RemoteException e) {
throw new AuthenticationException(e.getLocalizedMessage());
}
switch (res.getResponseCode()) {
case ResponseCodes.AUTH_GRANTED:
client = res.getIdentity();
break;
case ResponseCodes.AUTH_REDIRECT:
client = res.getIdentity();
server = res.getServer();
break;
case ResponseCodes.AUTH_DENIED:
throw (AuthenticationException) new AuthenticationException("This principle is not authorized.").initCause(res.getDeniedCause());
}
}
代码示例来源:origin: org.apache.openejb/openejb-client
public void authenticate(final String userID, final String psswrd, final boolean logout) throws AuthenticationException {
final AuthenticationRequest req = new AuthenticationRequest(String.class.cast(env.get(AUTHENTICATION_REALM_NAME)), userID, psswrd, getTimeout(env));
if (logout) {
req.setLogoutIdentity(null != client ? client.getClientIdentity() : null);
}
final AuthenticationResponse res;
try {
res = requestAuthorization(req);
} catch (final RemoteException e) {
throw new AuthenticationException(e.getLocalizedMessage());
}
switch (res.getResponseCode()) {
case ResponseCodes.AUTH_GRANTED:
client = logout ? new ClientMetaData() : res.getIdentity();
break;
case ResponseCodes.AUTH_REDIRECT:
client = logout ? new ClientMetaData() : res.getIdentity();
server = res.getServer();
break;
case ResponseCodes.AUTH_DENIED:
throw (AuthenticationException) new AuthenticationException("This principle is not authorized.").initCause(res.getDeniedCause());
}
seedClientSerializer();
}
内容来源于网络,如有侵权,请联系作者删除!