public class GreenBuilder extends Object implements ExternalReferenceBuilderSPI<GreenReference>
Constructor and Description |
---|
GreenBuilder() |
Modifier and Type | Method and Description |
---|---|
GreenReference |
createReference(InputStream is,
ReferenceContext context)
Construct a new GreenReference from the given input stream, ignoring the
otherwise helpful context as we don't need any resources from it.
|
float |
getConstructionCost()
Construction cost fixed at 1.5f
|
Class<GreenReference> |
getReferenceType()
Expose the type of the ExternalReferenceSPI that this builder can
construct
|
boolean |
isEnabled(ReferenceContext arg0)
Doesn't use any context resources so is always enabled
|
public GreenReference createReference(InputStream is, ReferenceContext context) throws ExternalReferenceConstructionException
createReference
in interface ExternalReferenceBuilderSPI<GreenReference>
is
- the bytestream to read target from.context
- a reference resolution context, needed potentially to
construct the new ExternalReferenceSchemeSPI, especially in
cases where the context contains security agents giving access
to a remote data staging system *ExternalReferenceConstructionException
- if there are any issues building the new GreenReference
(which there won't be)public float getConstructionCost()
getConstructionCost
in interface ExternalReferenceBuilderSPI<GreenReference>
1.5f
public Class<GreenReference> getReferenceType()
ExternalReferenceBuilderSPI
getReferenceType
in interface ExternalReferenceBuilderSPI<GreenReference>
GreenReference
.class
public boolean isEnabled(ReferenceContext arg0)
isEnabled
in interface ExternalReferenceBuilderSPI<GreenReference>
arg0
- the reference context that will be used to construct new
referencestrue
Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.