String host = option(FRANK_HOST, DEFAULT_FRANK_HOST);
int port = Integer.parseInt(option(FRANK_PORT, DEFAULT_FRANK_PORT));
ResourceFactory resources = new URLResourceFactory();
ResourceFactory publishingResources = new PublishingResourceFactory(publisher, resources);
Endpoint endpoint = new ResourceFactoryBasedEndpoint(FRANK_ENDPOINT_PROTOCOL, host, port, publishingResources);
Codec codec = new FranklyJsonCodec();
SerializingEndpoint codecEndpoint = new CodecEndpoint(endpoint, codec);
return new PublishingFrank(publisher, new FranklyFrank(codecEndpoint));
}
};
}