org.springframework.erlang.core
Class ErlangTemplate
java.lang.Object
org.springframework.erlang.support.ErlangAccessor
org.springframework.erlang.core.ErlangTemplate
- All Implemented Interfaces:
- InitializingBean, ErlangOperations
public class ErlangTemplate
- extends ErlangAccessor
- implements ErlangOperations
- Author:
- Mark Pollack
Method Summary |
protected OtpException |
convertOtpAccessException(Exception ex)
Convert the specified checked exception to
a Spring runtime exception equivalent. |
|
execute(ConnectionCallback<T> action)
|
Object |
executeAndConvertRpc(String module,
String function,
ErlangConverter converterToUse,
Object... args)
|
Object |
executeAndConvertRpc(String module,
String function,
Object... args)
|
com.ericsson.otp.erlang.OtpErlangObject |
executeErlangRpc(String module,
String function,
com.ericsson.otp.erlang.OtpErlangList args)
|
com.ericsson.otp.erlang.OtpErlangObject |
executeErlangRpc(String module,
String function,
com.ericsson.otp.erlang.OtpErlangObject... args)
|
com.ericsson.otp.erlang.OtpErlangObject |
executeRpc(String module,
String function,
Object... args)
|
ErlangConverter |
getErlangConverter()
|
void |
handleResponseError(String module,
String function,
com.ericsson.otp.erlang.OtpErlangObject result)
|
void |
setErlangConverter(ErlangConverter erlangConverter)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ErlangTemplate
public ErlangTemplate(ConnectionFactory connectionFactory)
executeErlangRpc
public com.ericsson.otp.erlang.OtpErlangObject executeErlangRpc(String module,
String function,
com.ericsson.otp.erlang.OtpErlangList args)
- Specified by:
executeErlangRpc
in interface ErlangOperations
handleResponseError
public void handleResponseError(String module,
String function,
com.ericsson.otp.erlang.OtpErlangObject result)
executeErlangRpc
public com.ericsson.otp.erlang.OtpErlangObject executeErlangRpc(String module,
String function,
com.ericsson.otp.erlang.OtpErlangObject... args)
- Specified by:
executeErlangRpc
in interface ErlangOperations
executeRpc
public com.ericsson.otp.erlang.OtpErlangObject executeRpc(String module,
String function,
Object... args)
- Specified by:
executeRpc
in interface ErlangOperations
executeAndConvertRpc
public Object executeAndConvertRpc(String module,
String function,
ErlangConverter converterToUse,
Object... args)
- Specified by:
executeAndConvertRpc
in interface ErlangOperations
executeAndConvertRpc
public Object executeAndConvertRpc(String module,
String function,
Object... args)
- Specified by:
executeAndConvertRpc
in interface ErlangOperations
getErlangConverter
public ErlangConverter getErlangConverter()
setErlangConverter
public void setErlangConverter(ErlangConverter erlangConverter)
execute
public <T> T execute(ConnectionCallback<T> action)
throws OtpException
- Specified by:
execute
in interface ErlangOperations
- Throws:
OtpException
convertOtpAccessException
protected OtpException convertOtpAccessException(Exception ex)
- Convert the specified checked exception to
a Spring runtime exception equivalent.
The default implementation delegates to the
ErlangUtils.convertOtpAccessException(java.lang.Exception)
method.
- Overrides:
convertOtpAccessException
in class ErlangAccessor
- Parameters:
ex
- the original checked Exception
to convert
- Returns:
- the Spring runtime wrapping
ex
- See Also:
ErlangUtils.convertOtpAccessException(java.lang.Exception)
Copyright © 2011. All Rights Reserved.