public class ExchangeSpecification extends Object
Specification to provide the following to ExchangeFactory
:
Exchange
Constructor and Description |
---|
ExchangeSpecification(Class exchangeClass)
Static binding
|
ExchangeSpecification(String exchangeClassName)
Dynamic binding
|
Modifier and Type | Method and Description |
---|---|
String |
getApiKey()
Get the API key.
|
String |
getExchangeClassName() |
String |
getExchangeDescription()
Get the exchange description (e.g.
|
String |
getExchangeName()
Get the exchange name.
|
Map<String,Object> |
getExchangeSpecificParameters()
Get the arbitrary exchange-specific parameters to be passed to the exchange implementation.
|
Object |
getExchangeSpecificParametersItem(String key)
Get an item from the arbitrary exchange-specific parameters to be passed to the exchange implementation.
|
String |
getHost()
Get the host name of the server providing data (e.g.
|
String |
getMetaDataJsonFileOverride()
Get the override file for generating the
ExchangeMetaData object. |
Object |
getParameter(String key) |
String |
getPassword()
Get the password for authentication.
|
String |
getPlainTextUri()
Get the URI to reach the root of the exchange API for plaintext (non-SSL) queries (e.g.
|
String |
getPlainTextUriStreaming()
Set the URI for plain text streaming.
|
int |
getPort()
Get the port number of the server providing direct socket data (e.g.
|
String |
getSecretKey()
Get the API secret key typically used in HMAC signing of requests.
|
String |
getSslUri()
Get the URI to reach the root of the exchange API for SSL queries (e.g.
|
String |
getSslUriStreaming()
Get the URI for SSL streaming.
|
String |
getUserName()
Get the username for authentication.
|
void |
setApiKey(String apiKey)
Set the API key.
|
void |
setExchangeDescription(String exchangeDescription)
Set the exchange description (e.g.
|
void |
setExchangeName(String exchangeName)
Set the exchange name (e.g.
|
void |
setExchangeSpecificParameters(Map<String,Object> exchangeSpecificParameters)
Set the arbitrary exchange-specific parameters to be passed to the exchange implementation.
|
void |
setExchangeSpecificParametersItem(String key,
Object value)
Set an item in the arbitrary exchange-specific parameters to be passed to the exchange implementation.
|
void |
setHost(String host)
Set the host name of the server providing data.
|
void |
setMetaDataJsonFileOverride(String metaDataJsonFileOverride)
Set the override file for generating the
ExchangeMetaData object. |
void |
setPassword(String password)
Set the password for authentication.
|
void |
setPlainTextUri(String plainTextUri)
Set the URI to reach the root of the exchange API for plaintext (non-SSL) queries (e.g.
|
void |
setPlainTextUriStreaming(String plainTextUriStreaming)
Set the URI for plain text streaming.
|
void |
setPort(int port)
Set the port number of the server providing direct socket data (e.g.
|
void |
setSecretKey(String secretKey)
Set the API secret key typically used in HMAC signing of requests.
|
void |
setSslUri(String uri)
Set the URI to reach the root of the exchange API for SSL queries (e.g.
|
void |
setSslUriStreaming(String sslUriStreaming)
Set the URI for SSL streaming.
|
void |
setUserName(String userName)
Set the username for authentication.
|
public ExchangeSpecification(String exchangeClassName)
exchangeClassName
- The exchange class name (e.g. "com.xeiam.xchange.mtgox.v1.MtGoxExchange")public ExchangeSpecification(Class exchangeClass)
exchangeClass
- The exchange classpublic String getExchangeClassName()
public Object getParameter(String key)
key
- The key into the parameter map (recommend using the provided standard static entries)Exchange
may consume to configure servicespublic String getHost()
public void setHost(String host)
host
- the host namepublic String getApiKey()
public void setApiKey(String apiKey)
apiKey
- the API keypublic int getPort()
public void setPort(int port)
port
- the port numberpublic String getSecretKey()
public void setSecretKey(String secretKey)
secretKey
- the secret keypublic String getSslUri()
public void setSslUri(String uri)
uri
- the SSL URIpublic String getPlainTextUri()
public void setPlainTextUri(String plainTextUri)
plainTextUri
- the plain text URIpublic String getPlainTextUriStreaming()
public void setPlainTextUriStreaming(String plainTextUriStreaming)
plainTextUriStreaming
- the plaintext streaming URIpublic String getSslUriStreaming()
public void setSslUriStreaming(String sslUriStreaming)
sslUriStreaming
- the URI for ssl streamingpublic Map<String,Object> getExchangeSpecificParameters()
public void setExchangeSpecificParameters(Map<String,Object> exchangeSpecificParameters)
exchangeSpecificParameters
- a Map of named exchange-specific parameter valuespublic Object getExchangeSpecificParametersItem(String key)
public void setExchangeSpecificParametersItem(String key, Object value)
exchangeSpecificParameters
- a Map of named exchange-specific parameter valuespublic String getPassword()
public void setPassword(String password)
password
- the passwordpublic String getUserName()
public void setUserName(String userName)
userName
- the usernamepublic String getExchangeName()
public void setExchangeName(String exchangeName)
exchangeName
- the exchange namepublic String getExchangeDescription()
public void setExchangeDescription(String exchangeDescription)
exchangeDescription
- the exchange descriptionpublic String getMetaDataJsonFileOverride()
ExchangeMetaData
object. By default, the
ExchangeMetaData
object is loaded at startup from a json file on the classpath with the same name as the name
of the exchange as defined in ExchangeSpecification
. With this parameter, you can override that file with a file of your choice located
outside of the classpath.public void setMetaDataJsonFileOverride(String metaDataJsonFileOverride)
ExchangeMetaData
object. By default, the
ExchangeMetaData
object is loaded at startup from a json file on the classpath with the same name as the name
of the exchange as defined in ExchangeSpecification
. With this parameter, you can override that file with a file of your choice located
outside of the classpath.Copyright © 2012–2017 Xeiam, LLC. All rights reserved.