Package org.oddjob.jmx.general
Class LocalRemoteConnection
java.lang.Object
org.oddjob.jmx.general.LocalRemoteConnection
- All Implemented Interfaces:
AutoCloseable,RemoteConnection,RemoteInvoker,RemoteNotifier
Experimental implementation of an
RemoteConnection that is local. It uses
ServerInterfaceHandlerFactorys to provide the connection facade
in as close a way as JMX does.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescription<T> voidaddNotificationListener(long remoteId, NotificationType<T> notificationType, NotificationListener<T> notificationListener) voidclose()protected longcreate(Object component, ServerContext serverContext) voiddestroy(long remoteId) Allows an implementations to clear up resources after a node has been destroyed.<T> Tinvoke(long remoteId, OperationType<T> operationType, Object... args) <T> voidremoveNotificationListener(long remoteId, NotificationType<T> notificationType, NotificationListener<T> notificationListener) with(ArooaSession arooaSession, NotificationControl notificationControl)
-
Method Details
-
with
public static LocalRemoteConnection.Builder with(ArooaSession arooaSession, NotificationControl notificationControl) -
create
-
destroy
Description copied from interface:RemoteConnectionAllows an implementations to clear up resources after a node has been destroyed.- Specified by:
destroyin interfaceRemoteConnection- Parameters:
remoteId- The remote id of the node destroyed.- Throws:
RemoteException
-
invoke
public <T> T invoke(long remoteId, OperationType<T> operationType, Object... args) throws RemoteException - Specified by:
invokein interfaceRemoteInvoker- Throws:
RemoteException
-
addNotificationListener
public <T> void addNotificationListener(long remoteId, NotificationType<T> notificationType, NotificationListener<T> notificationListener) throws RemoteException - Specified by:
addNotificationListenerin interfaceRemoteNotifier- Throws:
RemoteException
-
removeNotificationListener
public <T> void removeNotificationListener(long remoteId, NotificationType<T> notificationType, NotificationListener<T> notificationListener) throws RemoteException - Specified by:
removeNotificationListenerin interfaceRemoteNotifier- Throws:
RemoteException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceRemoteConnection- Throws:
RemoteException
-