Skip to content

Commit

Permalink
Merge pull request #221 from Marketcetera/release321
Browse files Browse the repository at this point in the history
Prepare to release 3.2.1
  • Loading branch information
colinduplantis authored Dec 23, 2020
2 parents f7f9db8 + bdd61e8 commit 3c01d22
Show file tree
Hide file tree
Showing 145 changed files with 1,907 additions and 1,347 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ void updateFixSession(String inIncomingName,
*
* @param inNewUser a <code>User</code> value
* @param inPassword a <code>String</code> value
* @return a <code>User</code> value
*/
User createUser(User inNewUser,
String inPassword);
Expand Down
10 changes: 5 additions & 5 deletions client/src/test/java/org/marketcetera/client/ClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.marketcetera.trade.TypesTestBase.assertCancelRejectEquals;
import static org.marketcetera.trade.TypesTestBase.assertExecReportEquals;
Expand All @@ -31,6 +30,7 @@
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.atomic.AtomicLong;

import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.After;
import org.junit.AfterClass;
Expand Down Expand Up @@ -437,7 +437,7 @@ protected void run() throws Exception {
Map<PositionKey<Option>, BigDecimal> positions = getClient().
getOptionPositionsAsOf(date, "XYZ", "PQR");
assertEquals(2, positions.size());
assertThat(positions, allOf(hasEntry(
MatcherAssert.assertThat(positions, allOf(hasEntry(
PositionKeyFactory.createOptionKey("XYZ",
option.getExpiry(), option.getStrikePrice(),
option.getType(), "acc", "tra"),
Expand All @@ -452,7 +452,7 @@ protected void run() throws Exception {
//getAllOptionPositionsAsOf()
positions = getClient().getAllOptionPositionsAsOf(date);
assertEquals(1, positions.size());
assertThat(positions, Matchers.hasEntry(
MatcherAssert.assertThat(positions, Matchers.hasEntry(
PositionKeyFactory.createOptionKey("OPT",
option.getExpiry(), option.getStrikePrice(),
option.getType(), "acc", "tra"),
Expand Down Expand Up @@ -486,7 +486,7 @@ protected void run() throws Exception {

roots = getClient().getOptionRoots(symbol);
assertEquals(symbol.length(), roots.size());
assertThat(roots, Matchers.hasItem(symbol));
MatcherAssert.assertThat(roots, Matchers.hasItem(symbol));
//verify caching
sServer.getServiceImpl().resetServiceInvoked();
assertSame(roots, getClient().getOptionRoots(symbol));
Expand Down Expand Up @@ -1104,7 +1104,7 @@ protected void run() throws Exception {
}

/**
* Verifies the interplay between client initialization, reconnect & close.
* Verifies the interplay between client initialization, reconnect &amp; close.
*
* @throws Exception if there were errors
*/
Expand Down
10 changes: 5 additions & 5 deletions client/src/test/java/org/marketcetera/client/MockClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ public void setSendOrderSingleException(ConnectionException inException)
/**
* Sets the sendOrderReplaceConnectionException value.
*
* @param a <code>ConnectionException</code> value
* @param inSendOrderReplaceConnectionException a <code>ConnectionException</code> value
*/
public void setSendOrderReplaceConnectionException(ConnectionException inSendOrderReplaceConnectionException)
{
Expand All @@ -545,7 +545,7 @@ public void setSendOrderReplaceConnectionException(ConnectionException inSendOrd
/**
* Sets the sendOrderCancelConnectionException value.
*
* @param a <code>ConnectionException</code> value
* @param inSendOrderCancelConnectionException a <code>ConnectionException</code> value
*/
public void setSendOrderCancelConnectionException(ConnectionException inSendOrderCancelConnectionException)
{
Expand All @@ -554,7 +554,7 @@ public void setSendOrderCancelConnectionException(ConnectionException inSendOrde
/**
* Sets the sendOrderSingleValidationException value.
*
* @param an <code>OrderValidationException</code> value
* @param inSendOrderSingleValidationException an <code>OrderValidationException</code> value
*/
public void setSendOrderSingleValidationException(OrderValidationException inSendOrderSingleValidationException)
{
Expand All @@ -563,7 +563,7 @@ public void setSendOrderSingleValidationException(OrderValidationException inSen
/**
* Sets the sendOrderReplaceValidationException value.
*
* @param an <code>OrderValidationException</code> value
* @param inSendOrderReplaceValidationException an <code>OrderValidationException</code> value
*/
public void setSendOrderReplaceValidationException(OrderValidationException inSendOrderReplaceValidationException)
{
Expand All @@ -572,7 +572,7 @@ public void setSendOrderReplaceValidationException(OrderValidationException inSe
/**
* Sets the sendOrderCancelValidationException value.
*
* @param an <code>OrderValidationException</code> value
* @param inSendOrderCancelValidationException an <code>OrderValidationException</code> value
*/
public void setSendOrderCancelValidationException(OrderValidationException inSendOrderCancelValidationException)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ message, new BrokerID("default"),

/**
* The URL for the broker hosted by this server.
* Do note that this URL is changed, the mock_server.xml & broker.xml
* Do note that this URL is changed, the mock_server.xml &amp; broker.xml
* files need to be updated as well.
*/
public static final String URL = "tcp://localhost:61616";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public interface ClusterService
/**
* Adds the given object to the given cluster queue.
*
* @param <Clazz> the type of object
* @param inQueueDescriptor a <code>QueueDescriptor&lt;Class&gt;</code> value
* @param inObject a <code>Clazz</code> value
*/
Expand All @@ -33,6 +34,7 @@ <Clazz extends Serializable> void addToQueue(QueueDescriptor<Clazz> inQueueDescr
/**
* Peeks the top value in the given queue.
*
* @param <Clazz> the type of object held by the queue
* @param inQueueDescriptor a <code>QueueDescriptor&lt;Class&gt;</code> value
* @return a <code>Clazz</code> value or <code>null</code>
*/
Expand All @@ -42,6 +44,8 @@ <Clazz extends Serializable> void addToQueue(QueueDescriptor<Clazz> inQueueDescr
*
* <p>This call will block until a value becomes available.
*
* @param <Clazz> the type of object held by the queue
* @param inQueueDescriptor a <code>QueueDescriptor&lt;Class&gt;</code> value
* @return a <code>QueueDescriptor&lt;Class&gt;</code> value
* @throws InterruptedException if this call is interrupted
*/
Expand All @@ -56,6 +60,7 @@ <Clazz extends Serializable> Clazz takeFromQueue(QueueDescriptor<Clazz> inQueueD
/**
* Asynchronously executes the given task on members of the cluster as determined by the task.
*
* @param <Clazz> the type of object returned by the task
* @param inTask a <code>CallableClusterTask&lt;Clazz&gt;</code> value
* @return an <code>Map&lt;Object,Future&lt;Clazz&gt;</code> value containing the result tokens by cluster member
* @throws Exception if an error occurs executing the task
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -547,10 +547,10 @@ protected ClusterWorkUnitDescriptor generateWorkUnitDescriptor(ClusterWorkUnitSp
* Returns a candidate that suits the given work unit spec if one exists.
*
* @param inWorkUnitSpec a <code>ClusterWorkUnitSpec</code> value
* @return an <code>Object</code> value
* @throws InvocationTargetException
* @throws IllegalArgumentException
* @throws IllegalAccessException
* @return an <code>Object</code> value or <code>null</code>
* @throws InvocationTargetException if the candidate cannot be instantiated
* @throws IllegalArgumentException if an error occurs finding the candidate
* @throws IllegalAccessException if the candidate cannot be instatiated
*/
protected Object findCandidateFor(ClusterWorkUnitSpec inWorkUnitSpec)
throws IllegalAccessException, IllegalArgumentException, InvocationTargetException
Expand Down Expand Up @@ -590,10 +590,10 @@ protected void activateWorkUnit(Object inCandidate)
* Finds a candidate bean for the given work unit spec and activates it.
*
* @param inWorkUnitSpec a <code>ClusterWorkUnitSpec</code> value
* @return an <code>Object</code>value
* @throws InvocationTargetException
* @throws IllegalArgumentException
* @throws IllegalAccessException
* @return an <code>Object</code>value or <code>null</code>
* @throws InvocationTargetException if the work unit cannot be activated
* @throws IllegalArgumentException if an error occurs finding the work unit
* @throws IllegalAccessException if the work unit cannot be activated
*/
protected Object findAndActivateWorkUnit(ClusterWorkUnitSpec inWorkUnitSpec)
throws IllegalAccessException, IllegalArgumentException, InvocationTargetException
Expand Down Expand Up @@ -723,6 +723,8 @@ protected Map<String,Object> findAllBeansWith(Class<? extends Annotation> inAnno
/**
* Gets the annotation of the given type from the given argument.
*
* @param <Clazz> the class of the given object
* @param <AnnotationClazz> the type of the given annotation
* @param inInstance an <code>Object</code> value
* @param inAnnotation a <code>Class&lt;AnnotationClazz&gt;</code> value
* @return an <code>AnnotationClazz</code> value
Expand Down Expand Up @@ -859,6 +861,7 @@ protected void logClusterMetaData()
/**
* Marshals the given value as XML.
*
* @param <Clazz> the type of the provided data
* @param inData a <code>Clazz</code> value
* @return a <code>String</code> value
* @throws JAXBException if the given object cannot be marshaled
Expand Down
14 changes: 10 additions & 4 deletions core/src/main/java/org/marketcetera/core/ApplicationBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,11 @@ public void stopWaitingForever()
public boolean isWaitingForever() {
return waitingForever;
}

/** Get the FIX version associated with this application */
/**
* Get the FIX version associated with this application.
*
* @return a <code>FIXVersion</code> value
*/
public FIXVersion getFIXVersion()
{
return fixVersion;
Expand All @@ -153,8 +156,11 @@ public long getApproximateTime() {
// TODO: make this read a variable that is updated periodically by a thread
return System.currentTimeMillis(); //i18n_datetime
}

/** Returns a pointer to the Spring application context that started this app */
/**
* Returns a pointer to the Spring application context that started this app.
*
* @return a <code>ClassPathXmlApplicationContext</code> value
*/
public ClassPathXmlApplicationContext getAppCtx() {
return appCtx;
}
Expand Down
Loading

0 comments on commit 3c01d22

Please sign in to comment.