use of feign.jackson.JacksonEncoder in project nem-library by rosklyar.
the class DefaultNemClientFactory method createTransactionClient.
@Override
public TransactionClient createTransactionClient(String configurationPrefix, Network network, MosaicClient mosaicClient, AccountClient accountClient, NodeClient nodeClient) {
FeignTransactionClient feignTransactionClient = builder().client(RibbonClient.create()).encoder(new JacksonEncoder()).decoder(new JacksonDecoder()).target(FeignTransactionClient.class, format("http://%s", configurationPrefix));
HexConverter hexConverter = new DefaultHexConverter();
ByteSerializer byteSerializer = new DefaultByteSerializer(hexConverter);
TransactionEncoder transactionEncoder = new ByteArrayTransactionEncoder(byteSerializer, hexConverter);
VersionProvider versionProvider = new DefaultVersionProvider();
FeeCalculator feeCalculator = new DefaultFeeCalculator(mosaicClient, accountClient);
return new SecureTransactionClient(network, feignTransactionClient, transactionEncoder, hexConverter, versionProvider, feeCalculator, nodeClient);
}
use of feign.jackson.JacksonEncoder in project atlasdb by palantir.
the class TransactionRemotingTest method setup.
@Before
public void setup() {
String uri = dropwizard.baseUri().toString();
service = Feign.builder().decoder(new JacksonDecoder(mapper)).encoder(new JacksonEncoder(mapper)).contract(new JAXRSContract()).target(AtlasDbService.class, uri);
}
use of feign.jackson.JacksonEncoder in project nem-library by rosklyar.
the class DefaultNemClientFactory method simpleTransactionClient.
@Override
public TransactionClient simpleTransactionClient(String url, Network network) {
FeignTransactionClient feignTransactionClient = Feign.builder().encoder(new JacksonEncoder()).decoder(new JacksonDecoder()).target(FeignTransactionClient.class, url);
HexConverter hexConverter = new DefaultHexConverter();
ByteSerializer byteSerializer = new DefaultByteSerializer(hexConverter);
TransactionEncoder transactionEncoder = new ByteArrayTransactionEncoder(byteSerializer, hexConverter);
VersionProvider versionProvider = new DefaultVersionProvider();
FeeCalculator feeCalculator = new DefaultFeeCalculator(simpleMosaicClient(url), simpleAccountClient(url));
return new SecureTransactionClient(network, feignTransactionClient, transactionEncoder, hexConverter, versionProvider, feeCalculator, simpleNodeClient(url));
}
use of feign.jackson.JacksonEncoder in project feign by OpenFeign.
the class SpringContractTest method setup.
@Before
public void setup() throws IOException {
mockClient = new MockClient().noContent(HttpMethod.GET, "/health").noContent(HttpMethod.GET, "/health/1").noContent(HttpMethod.GET, "/health/1?deep=true").noContent(HttpMethod.GET, "/health/1?deep=true&dryRun=true").ok(HttpMethod.GET, "/health/generic", "{}");
resource = Feign.builder().contract(new SpringContract()).encoder(new JacksonEncoder()).decoder(new JacksonDecoder()).client(mockClient).target(new MockTarget<>(HealthResource.class));
}
Aggregations