com.dxfeed.api
Class DXEndpoint.Builder

java.lang.Object
  extended by com.dxfeed.api.DXEndpoint.Builder
Enclosing class:
DXEndpoint

@Service
public abstract static class DXEndpoint.Builder
extends Object

Builder class for DXEndpoint that supports additional configuration properties.


Field Summary
protected  DXEndpoint.Role role
          Current role for implementations of DXEndpoint.Builder.
 
Constructor Summary
protected DXEndpoint.Builder()
          Protected constructor for implementations of DXEndpoint.Builder.
 
Method Summary
abstract  DXEndpoint build()
          Builds DXEndpoint instance.
abstract  boolean supportsProperty(String key)
          Returns true if the corresponding property key is supported.
 DXEndpoint.Builder withProperties(Properties props)
          Sets all supported properties from the provided properties object.
abstract  DXEndpoint.Builder withProperty(String key, String value)
          Sets the specified property.
 DXEndpoint.Builder withRole(DXEndpoint.Role role)
          Sets role for the created DXEndpoint.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

role

protected DXEndpoint.Role role
Current role for implementations of DXEndpoint.Builder.

Constructor Detail

DXEndpoint.Builder

protected DXEndpoint.Builder()
Protected constructor for implementations of DXEndpoint.Builder.

Method Detail

withRole

public DXEndpoint.Builder withRole(DXEndpoint.Role role)
Sets role for the created DXEndpoint. Default role is FEED.

Returns:
this endpoint builder.

withProperty

public abstract DXEndpoint.Builder withProperty(String key,
                                                String value)
Sets the specified property. Unsupported properties are ignored.

Returns:
this endpoint builder.
See Also:
supportsProperty(String)

withProperties

public DXEndpoint.Builder withProperties(Properties props)
Sets all supported properties from the provided properties object.

Returns:
this endpoint builder.
See Also:
withProperty(String, String)

supportsProperty

public abstract boolean supportsProperty(String key)
Returns true if the corresponding property key is supported.

See Also:
withProperty(String, String)

build

public abstract DXEndpoint build()
Builds DXEndpoint instance.

Returns:
the created endpoint.


Copyright © 2013 Devexperts. All Rights Reserved.