Package org.djutils.event.remote
Class RemoteEventPubSubTest
java.lang.Object
org.djutils.event.remote.RemoteEventPubSubTest
public class RemoteEventPubSubTest extends Object
RemoteEventTest makes some very basic tests for the RemoteEventListener and RemoteEventProducer.
Copyright (c) 2019-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See DJUNITS License.
- Author:
- Alexander Verbraeck
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classRemoteEventPubSubTest.TestRemoteEventListenerprotected static classRemoteEventPubSubTest.TestRemoteEventProducerprotected static classRemoteEventPubSubTest.TestTimedRemoteEventListener<C extends Comparable<C> & Serializable>TimedRemoteEventListener. -
Constructor Summary
Constructors Constructor Description RemoteEventPubSubTest() -
Method Summary
Modifier and Type Method Description voidtestEventProducerWeakRemoval()Test the EventProducer for a weak reference that is removed by the garbage collector.voidtestEventStrongWeakPos()Test the EventProducer for strong and weak references, and for position information.voidtestRemoteEventListenerProducer()Test the construction of the RemoteEventListsner and RemoteEventProducer.voidtestTimedRemoteEventListenerProducer()Test the construction of the RemoteEventListsner and RemoteEventProducer.
-
Constructor Details
-
RemoteEventPubSubTest
public RemoteEventPubSubTest()
-
-
Method Details
-
testRemoteEventListenerProducer
public void testRemoteEventListenerProducer() throws RemoteException, AlreadyBoundException, MalformedURLExceptionTest the construction of the RemoteEventListsner and RemoteEventProducer.- Throws:
RemoteException- on remote errorAlreadyBoundException- when producer or listener is already bound in the RMI registryMalformedURLException- on URL error
-
testTimedRemoteEventListenerProducer
public void testTimedRemoteEventListenerProducer() throws RemoteException, AlreadyBoundException, MalformedURLExceptionTest the construction of the RemoteEventListsner and RemoteEventProducer.- Throws:
RemoteException- on remote errorAlreadyBoundException- when producer or listener is already bound in the RMI registryMalformedURLException- on URL error
-
testEventStrongWeakPos
public void testEventStrongWeakPos() throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, SecurityException, RemoteException, AlreadyBoundExceptionTest the EventProducer for strong and weak references, and for position information.- Throws:
SecurityException- on error retrieving listener mapNoSuchFieldException- on error retrieving listener mapIllegalAccessException- on error retrieving listener mapIllegalArgumentException- on error retrieving listener mapRemoteException- on network exceptionAlreadyBoundException- when RMI registry not cleaned
-
testEventProducerWeakRemoval
public void testEventProducerWeakRemoval() throws IllegalArgumentException, IllegalAccessException, NoSuchFieldException, SecurityException, RemoteException, AlreadyBoundExceptionTest the EventProducer for a weak reference that is removed by the garbage collector.- Throws:
SecurityException- on error retrieving listener mapNoSuchFieldException- on error retrieving listener mapIllegalAccessException- on error retrieving listener mapIllegalArgumentException- on error retrieving listener mapRemoteException- on network exceptionAlreadyBoundException- when RMI registry not cleaned
-