public class OrderLoaderMain extends Object implements org.springframework.context.Lifecycle
| Constructor and Description |
|---|
OrderLoaderMain() |
| Modifier and Type | Method and Description |
|---|---|
protected OrderProcessor |
createProcessor(ClientParameters inParameters)
Creates a processor given the parameters.
|
protected void |
displaySummary(OrderLoader inLoader)
Displays the summary of results after the order loader is done processing.
|
protected void |
doProcessing()
Reads the orders from the supplied and sends them to the server.
|
protected void |
exit()
Exits the current process with the supplied exit code.
|
protected String[] |
getArgs() |
String |
getClientIdPrefix()
Get the clientIdPrefix value.
|
String |
getClientURL()
Get the clientURL value.
|
String |
getClientUsername()
Get the clientUsername value.
|
String |
getClientWsHost()
Get the clientWsHost value.
|
String |
getClientWsPort()
Get the clientWsPort value.
|
protected String |
getExceptionMsg(Exception inException)
Gets the exception message from the supplied exception.
|
boolean |
isRunning() |
protected void |
printError(Exception inException)
Prints the supplied exception's message to the output.
|
protected void |
printMessage(String inMessage)
Prints the message to the output.
|
void |
setClientIdPrefix(String inClientIdPrefix)
Sets the clientIdPrefix value.
|
void |
setClientPassword(char[] inClientPassword)
Sets the clientPassword value.
|
void |
setClientURL(String inClientURL)
Sets the clientURL value.
|
void |
setClientUsername(String inClientUsername)
Sets the clientUsername value.
|
void |
setClientWsHost(String inClientWsHost)
Sets the clientWsHost value.
|
void |
setClientWsPort(String inClientWsPort)
Sets the clientWsPort value.
|
protected void |
setMsgStream(PrintStream inMsgStream)
Sets the stream on which all the messages should be printed.
|
void |
start() |
void |
stop() |
public boolean isRunning()
isRunning in interface org.springframework.context.Lifecyclepublic void start()
start in interface org.springframework.context.Lifecyclepublic void stop()
stop in interface org.springframework.context.Lifecyclepublic String getClientUsername()
String valuepublic void setClientUsername(String inClientUsername)
inClientUsername - a String valuepublic void setClientPassword(char[] inClientPassword)
inClientPassword - a char[] valuepublic String getClientURL()
String valuepublic void setClientURL(String inClientURL)
inClientURL - a String valuepublic String getClientWsHost()
String valuepublic void setClientWsHost(String inClientWsHost)
inClientWsHost - a String valuepublic String getClientIdPrefix()
String valuepublic void setClientIdPrefix(String inClientIdPrefix)
inClientIdPrefix - a String valuepublic String getClientWsPort()
String valuepublic void setClientWsPort(String inClientWsPort)
inClientWsPort - a String valueprotected void setMsgStream(PrintStream inMsgStream)
inMsgStream - the message stream on which all the messages should
be printed.protected void exit()
protected String[] getArgs()
protected void doProcessing()
throws Exception
Exception - if there were errors.protected OrderProcessor createProcessor(ClientParameters inParameters) throws Exception
This method is an implementation artifact to aid unit testing.
inParameters - the parameters to connect to the server.Exception - if there were errors creating the order processor.protected void displaySummary(OrderLoader inLoader)
inLoader - the order loader instance.protected void printMessage(String inMessage)
inMessage - the message to print.protected void printError(Exception inException)
inException - the exception whose messages should be
printed on the output.Copyright © 2014. All Rights Reserved.