repo_name stringlengths 7 104 | file_path stringlengths 13 198 | context stringlengths 67 7.15k | import_statement stringlengths 16 4.43k | code stringlengths 40 6.98k | prompt stringlengths 227 8.27k | next_line stringlengths 8 795 |
|---|---|---|---|---|---|---|
nfl/glitr | src/main/java/com/nfl/glitr/calculator/QueryComplexityCalculator.java | // Path: src/main/java/com/nfl/glitr/exception/GlitrException.java
// public class GlitrException extends RuntimeException {
//
// public GlitrException(String message) {
// super(message);
// }
//
// public GlitrException(String message, Throwable cause) {
// super(message, cause);
// ... | import com.nfl.glitr.exception.GlitrException;
import com.nfl.glitr.registry.schema.GlitrFieldDefinition;
import com.nfl.glitr.registry.schema.GlitrMetaDefinition;
import com.nfl.glitr.registry.schema.GraphQLConnectionList;
import graphql.language.*;
import graphql.parser.InvalidSyntaxException;
import graphql.parser.P... | * @param variables graphQL query variables
* @return {@link QueryComplexityNode}
*/
public QueryComplexityNode queryScoreDetails(String query, Map<String, Object> variables) {
if (StringUtils.isBlank(query)) {
throw new GlitrException("query cannot be null or empty");
}
... | // Path: src/main/java/com/nfl/glitr/exception/GlitrException.java
// public class GlitrException extends RuntimeException {
//
// public GlitrException(String message) {
// super(message);
// }
//
// public GlitrException(String message, Throwable cause) {
// super(message, cause);
// ... | rootComplexityNode.setFormula(getGraphQLMeta(rootSchemaField, COMPLEXITY_FORMULA_KEY)); |
nfl/glitr | src/main/java/com/nfl/glitr/calculator/QueryComplexityCalculator.java | // Path: src/main/java/com/nfl/glitr/exception/GlitrException.java
// public class GlitrException extends RuntimeException {
//
// public GlitrException(String message) {
// super(message);
// }
//
// public GlitrException(String message, Throwable cause) {
// super(message, cause);
// ... | import com.nfl.glitr.exception.GlitrException;
import com.nfl.glitr.registry.schema.GlitrFieldDefinition;
import com.nfl.glitr.registry.schema.GlitrMetaDefinition;
import com.nfl.glitr.registry.schema.GraphQLConnectionList;
import graphql.language.*;
import graphql.parser.InvalidSyntaxException;
import graphql.parser.P... | childScores += childComplexityNode.getTotalWeight();
}
double currentNodeScore = 0d;
if (!parentNode.isIgnore()) {
Map<String, Double> nodeContext = buildContext(parentNode, nestedContext, depth, childScores, queryVariables);
currentNodeScore = extractMultipl... | // Path: src/main/java/com/nfl/glitr/exception/GlitrException.java
// public class GlitrException extends RuntimeException {
//
// public GlitrException(String message) {
// super(message);
// }
//
// public GlitrException(String message, Throwable cause) {
// super(message, cause);
// ... | Optional<Set<GlitrMetaDefinition>> metaDefinitions = Optional.ofNullable(graphQlObject) |
nfl/glitr | src/main/java/com/nfl/glitr/calculator/QueryComplexityCalculator.java | // Path: src/main/java/com/nfl/glitr/exception/GlitrException.java
// public class GlitrException extends RuntimeException {
//
// public GlitrException(String message) {
// super(message);
// }
//
// public GlitrException(String message, Throwable cause) {
// super(message, cause);
// ... | import com.nfl.glitr.exception.GlitrException;
import com.nfl.glitr.registry.schema.GlitrFieldDefinition;
import com.nfl.glitr.registry.schema.GlitrMetaDefinition;
import com.nfl.glitr.registry.schema.GraphQLConnectionList;
import graphql.language.*;
import graphql.parser.InvalidSyntaxException;
import graphql.parser.P... |
double currentNodeScore = 0d;
if (!parentNode.isIgnore()) {
Map<String, Double> nodeContext = buildContext(parentNode, nestedContext, depth, childScores, queryVariables);
currentNodeScore = extractMultiplierFromListField(parentNode, nodeContext, queryVariables);
pare... | // Path: src/main/java/com/nfl/glitr/exception/GlitrException.java
// public class GlitrException extends RuntimeException {
//
// public GlitrException(String message) {
// super(message);
// }
//
// public GlitrException(String message, Throwable cause) {
// super(message, cause);
// ... | .filter(x -> x instanceof GlitrFieldDefinition) |
nfl/glitr | src/main/java/com/nfl/glitr/calculator/QueryComplexityCalculator.java | // Path: src/main/java/com/nfl/glitr/exception/GlitrException.java
// public class GlitrException extends RuntimeException {
//
// public GlitrException(String message) {
// super(message);
// }
//
// public GlitrException(String message, Throwable cause) {
// super(message, cause);
// ... | import com.nfl.glitr.exception.GlitrException;
import com.nfl.glitr.registry.schema.GlitrFieldDefinition;
import com.nfl.glitr.registry.schema.GlitrMetaDefinition;
import com.nfl.glitr.registry.schema.GraphQLConnectionList;
import graphql.language.*;
import graphql.parser.InvalidSyntaxException;
import graphql.parser.P... | return (collectionSize * defaultMultiplier) + childScores;
} else {
return currentNodeScore + childScores;
}
}
private <T> T getGraphQLMeta(GraphQLFieldDefinition graphQlObject, String name) {
Optional<Set<GlitrMetaDefinition>> metaDefinitions = Optional.ofNullab... | // Path: src/main/java/com/nfl/glitr/exception/GlitrException.java
// public class GlitrException extends RuntimeException {
//
// public GlitrException(String message) {
// super(message);
// }
//
// public GlitrException(String message, Throwable cause) {
// super(message, cause);
// ... | if (objType instanceof GraphQLConnectionList) { |
nfl/glitr | src/main/java/com/nfl/glitr/calculator/QueryComplexityCalculator.java | // Path: src/main/java/com/nfl/glitr/exception/GlitrException.java
// public class GlitrException extends RuntimeException {
//
// public GlitrException(String message) {
// super(message);
// }
//
// public GlitrException(String message, Throwable cause) {
// super(message, cause);
// ... | import com.nfl.glitr.exception.GlitrException;
import com.nfl.glitr.registry.schema.GlitrFieldDefinition;
import com.nfl.glitr.registry.schema.GlitrMetaDefinition;
import com.nfl.glitr.registry.schema.GraphQLConnectionList;
import graphql.language.*;
import graphql.parser.InvalidSyntaxException;
import graphql.parser.P... | if (type.isAssignableFrom(o.getClass())) {
return Optional.of((T) o);
}
}
return Optional.empty();
}
@SuppressWarnings("unchecked")
private <T> List<T> getByType(Collection collection, Class<T> type) {
List<T> res = new ArrayList<>();
... | // Path: src/main/java/com/nfl/glitr/exception/GlitrException.java
// public class GlitrException extends RuntimeException {
//
// public GlitrException(String message) {
// super(message);
// }
//
// public GlitrException(String message, Throwable cause) {
// super(message, cause);
// ... | Boolean ignore = getGraphQLMeta(field, COMPLEXITY_IGNORE_KEY); |
nfl/glitr | src/main/java/com/nfl/glitr/registry/datafetcher/query/OverrideDataFetcher.java | // Path: src/main/java/com/nfl/glitr/exception/GlitrException.java
// public class GlitrException extends RuntimeException {
//
// public GlitrException(String message) {
// super(message);
// }
//
// public GlitrException(String message, Throwable cause) {
// super(message, cause);
// ... | import com.nfl.glitr.exception.GlitrException;
import graphql.schema.DataFetcher;
import graphql.schema.DataFetchingEnvironment;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method; | package com.nfl.glitr.registry.datafetcher.query;
public class OverrideDataFetcher implements DataFetcher {
private static final Logger logger = LoggerFactory.getLogger(OverrideDataFetcher.class);
private Object override;
private Method overrideMethod;
/**
* This constructor is used for gett... | // Path: src/main/java/com/nfl/glitr/exception/GlitrException.java
// public class GlitrException extends RuntimeException {
//
// public GlitrException(String message) {
// super(message);
// }
//
// public GlitrException(String message, Throwable cause) {
// super(message, cause);
// ... | throw new GlitrException("Overwrite method exception", e.getTargetException()); |
nfl/glitr | src/test/groovy/com/nfl/glitr/data/mutation/MutationType.java | // Path: src/main/java/com/nfl/glitr/registry/mutation/RelayMutation.java
// public interface RelayMutation<I extends RelayMutationType, R extends RelayMutationType> {
//
// R call(I input, DataFetchingEnvironment env);
// }
//
// Path: src/main/java/com/nfl/glitr/registry/mutation/RelayMutationDataFetcher.java
/... | import com.nfl.glitr.annotation.GlitrArgument;
import com.nfl.glitr.annotation.GlitrArguments;
import com.nfl.glitr.annotation.GlitrDescription;
import com.nfl.glitr.registry.mutation.RelayMutation;
import com.nfl.glitr.registry.mutation.RelayMutationDataFetcher;
import graphql.schema.DataFetchingEnvironment; | package com.nfl.glitr.data.mutation;
public class MutationType {
@GlitrDescription("Saves Info related to a video")
@GlitrArguments({@GlitrArgument(name = "input", type = VideoMutationInput.class, required = true, defaultValue = "{default input}")})
public VideoMutationPayload getSaveVideoInfoMutation(Da... | // Path: src/main/java/com/nfl/glitr/registry/mutation/RelayMutation.java
// public interface RelayMutation<I extends RelayMutationType, R extends RelayMutationType> {
//
// R call(I input, DataFetchingEnvironment env);
// }
//
// Path: src/main/java/com/nfl/glitr/registry/mutation/RelayMutationDataFetcher.java
/... | RelayMutationDataFetcher relayMutationDataFetcher = new RelayMutationDataFetcher(VideoMutationInput.class, saveVideoInfo); |
nfl/glitr | src/test/groovy/com/nfl/glitr/data/mutation/MutationType.java | // Path: src/main/java/com/nfl/glitr/registry/mutation/RelayMutation.java
// public interface RelayMutation<I extends RelayMutationType, R extends RelayMutationType> {
//
// R call(I input, DataFetchingEnvironment env);
// }
//
// Path: src/main/java/com/nfl/glitr/registry/mutation/RelayMutationDataFetcher.java
/... | import com.nfl.glitr.annotation.GlitrArgument;
import com.nfl.glitr.annotation.GlitrArguments;
import com.nfl.glitr.annotation.GlitrDescription;
import com.nfl.glitr.registry.mutation.RelayMutation;
import com.nfl.glitr.registry.mutation.RelayMutationDataFetcher;
import graphql.schema.DataFetchingEnvironment; | package com.nfl.glitr.data.mutation;
public class MutationType {
@GlitrDescription("Saves Info related to a video")
@GlitrArguments({@GlitrArgument(name = "input", type = VideoMutationInput.class, required = true, defaultValue = "{default input}")})
public VideoMutationPayload getSaveVideoInfoMutation(Da... | // Path: src/main/java/com/nfl/glitr/registry/mutation/RelayMutation.java
// public interface RelayMutation<I extends RelayMutationType, R extends RelayMutationType> {
//
// R call(I input, DataFetchingEnvironment env);
// }
//
// Path: src/main/java/com/nfl/glitr/registry/mutation/RelayMutationDataFetcher.java
/... | class SaveVideoInfo implements RelayMutation<VideoMutationInput, VideoMutationPayload> { |
nfl/glitr | src/test/groovy/com/nfl/glitr/registry/type/Test.java | // Path: src/test/groovy/com/nfl/glitr/data/mutation/Bitrate.java
// public class Bitrate implements Playable {
//
// private String id;
// private Integer kbps;
// private String url;
// private Integer[] frames;
// private Float gradeAverage;
// private Double grade;
// private Long durat... | import com.nfl.glitr.data.mutation.Bitrate; | package com.nfl.glitr.registry.type;
public class Test {
private String id;
private String url; | // Path: src/test/groovy/com/nfl/glitr/data/mutation/Bitrate.java
// public class Bitrate implements Playable {
//
// private String id;
// private Integer kbps;
// private String url;
// private Integer[] frames;
// private Float gradeAverage;
// private Double grade;
// private Long durat... | private Bitrate bitrate; |
nfl/glitr | src/main/java/com/nfl/glitr/registry/mutation/RelayMutationDataFetcher.java | // Path: src/main/java/com/nfl/glitr/Glitr.java
// public class Glitr {
//
// private final TypeRegistry typeRegistry;
// private final GraphQLCodeRegistry.Builder codeRegistryBuilder;
// private final RelayHelper relayHelper;
// private GraphQLSchema schema;
// private QueryComplexityCalculator qu... | import com.nfl.glitr.Glitr;
import com.nfl.glitr.exception.GlitrValidationException;
import graphql.schema.DataFetcher;
import graphql.schema.DataFetchingEnvironment;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.annotation.Nullable;
import javax.validation.ConstraintViolation;
import javax.vali... | package com.nfl.glitr.registry.mutation;
/**
* DataFetcher used when GraphQL operation is a mutation
*/
public class RelayMutationDataFetcher implements DataFetcher {
@SuppressWarnings("unused")
private static final Logger logger = LoggerFactory.getLogger(RelayMutationDataFetcher.class);
private fina... | // Path: src/main/java/com/nfl/glitr/Glitr.java
// public class Glitr {
//
// private final TypeRegistry typeRegistry;
// private final GraphQLCodeRegistry.Builder codeRegistryBuilder;
// private final RelayHelper relayHelper;
// private GraphQLSchema schema;
// private QueryComplexityCalculator qu... | Object inputPayloadMtn = Glitr.getObjectMapper().convertValue(inputMap, mutationInputClass); |
nfl/glitr | src/main/java/com/nfl/glitr/relay/RelayImpl.java | // Path: src/main/java/com/nfl/glitr/registry/schema/GlitrFieldDefinition.java
// public class GlitrFieldDefinition extends FieldDefinition {
//
// private Set<GlitrMetaDefinition> metaDefinitions = new HashSet<>();
//
//
// public GlitrFieldDefinition(String name, Type type) {
// super(name, type);
... | import com.google.common.collect.Sets;
import com.nfl.glitr.registry.schema.GlitrFieldDefinition;
import com.nfl.glitr.registry.schema.GlitrMetaDefinition;
import com.nfl.glitr.registry.schema.GraphQLConnectionList;
import graphql.schema.GraphQLFieldDefinition;
import graphql.schema.GraphQLNonNull;
import graphql.schem... | .field(newFieldDefinition()
.name("startCursor")
.type(GraphQLString)
.description("When paginating backwards, the cursor to continue.")
.build())
.field(newFieldDefinition()
.name("endCursor")
... | // Path: src/main/java/com/nfl/glitr/registry/schema/GlitrFieldDefinition.java
// public class GlitrFieldDefinition extends FieldDefinition {
//
// private Set<GlitrMetaDefinition> metaDefinitions = new HashSet<>();
//
//
// public GlitrFieldDefinition(String name, Type type) {
// super(name, type);
... | .type(new GraphQLConnectionList(edgeType)) |
nfl/glitr | src/main/java/com/nfl/glitr/relay/RelayImpl.java | // Path: src/main/java/com/nfl/glitr/registry/schema/GlitrFieldDefinition.java
// public class GlitrFieldDefinition extends FieldDefinition {
//
// private Set<GlitrMetaDefinition> metaDefinitions = new HashSet<>();
//
//
// public GlitrFieldDefinition(String name, Type type) {
// super(name, type);
... | import com.google.common.collect.Sets;
import com.nfl.glitr.registry.schema.GlitrFieldDefinition;
import com.nfl.glitr.registry.schema.GlitrMetaDefinition;
import com.nfl.glitr.registry.schema.GraphQLConnectionList;
import graphql.schema.GraphQLFieldDefinition;
import graphql.schema.GraphQLNonNull;
import graphql.schem... | .field(newFieldDefinition()
.name("endCursor")
.type(GraphQLString)
.description("When paginating forwards, the cursor to continue.")
.build())
.field(newFieldDefinition()
.name("previousPageStart... | // Path: src/main/java/com/nfl/glitr/registry/schema/GlitrFieldDefinition.java
// public class GlitrFieldDefinition extends FieldDefinition {
//
// private Set<GlitrMetaDefinition> metaDefinitions = new HashSet<>();
//
//
// public GlitrFieldDefinition(String name, Type type) {
// super(name, type);
... | .definition(new GlitrFieldDefinition(name, Sets.newHashSet(new GlitrMetaDefinition(COMPLEXITY_IGNORE_KEY, true)))) |
nfl/glitr | src/main/java/com/nfl/glitr/relay/RelayImpl.java | // Path: src/main/java/com/nfl/glitr/registry/schema/GlitrFieldDefinition.java
// public class GlitrFieldDefinition extends FieldDefinition {
//
// private Set<GlitrMetaDefinition> metaDefinitions = new HashSet<>();
//
//
// public GlitrFieldDefinition(String name, Type type) {
// super(name, type);
... | import com.google.common.collect.Sets;
import com.nfl.glitr.registry.schema.GlitrFieldDefinition;
import com.nfl.glitr.registry.schema.GlitrMetaDefinition;
import com.nfl.glitr.registry.schema.GraphQLConnectionList;
import graphql.schema.GraphQLFieldDefinition;
import graphql.schema.GraphQLNonNull;
import graphql.schem... | .field(newFieldDefinition()
.name("endCursor")
.type(GraphQLString)
.description("When paginating forwards, the cursor to continue.")
.build())
.field(newFieldDefinition()
.name("previousPageStart... | // Path: src/main/java/com/nfl/glitr/registry/schema/GlitrFieldDefinition.java
// public class GlitrFieldDefinition extends FieldDefinition {
//
// private Set<GlitrMetaDefinition> metaDefinitions = new HashSet<>();
//
//
// public GlitrFieldDefinition(String name, Type type) {
// super(name, type);
... | .definition(new GlitrFieldDefinition(name, Sets.newHashSet(new GlitrMetaDefinition(COMPLEXITY_IGNORE_KEY, true)))) |
nfl/glitr | src/main/java/com/nfl/glitr/relay/RelayImpl.java | // Path: src/main/java/com/nfl/glitr/registry/schema/GlitrFieldDefinition.java
// public class GlitrFieldDefinition extends FieldDefinition {
//
// private Set<GlitrMetaDefinition> metaDefinitions = new HashSet<>();
//
//
// public GlitrFieldDefinition(String name, Type type) {
// super(name, type);
... | import com.google.common.collect.Sets;
import com.nfl.glitr.registry.schema.GlitrFieldDefinition;
import com.nfl.glitr.registry.schema.GlitrMetaDefinition;
import com.nfl.glitr.registry.schema.GraphQLConnectionList;
import graphql.schema.GraphQLFieldDefinition;
import graphql.schema.GraphQLNonNull;
import graphql.schem... | .field(newFieldDefinition()
.name("endCursor")
.type(GraphQLString)
.description("When paginating forwards, the cursor to continue.")
.build())
.field(newFieldDefinition()
.name("previousPageStart... | // Path: src/main/java/com/nfl/glitr/registry/schema/GlitrFieldDefinition.java
// public class GlitrFieldDefinition extends FieldDefinition {
//
// private Set<GlitrMetaDefinition> metaDefinitions = new HashSet<>();
//
//
// public GlitrFieldDefinition(String name, Type type) {
// super(name, type);
... | .definition(new GlitrFieldDefinition(name, Sets.newHashSet(new GlitrMetaDefinition(COMPLEXITY_IGNORE_KEY, true)))) |
nfl/glitr | src/test/groovy/com/nfl/glitr/data/query/Video.java | // Path: src/test/groovy/com/nfl/glitr/data/mutation/Bitrate.java
// public class Bitrate implements Playable {
//
// private String id;
// private Integer kbps;
// private String url;
// private Integer[] frames;
// private Float gradeAverage;
// private Double grade;
// private Long durat... | import com.nfl.glitr.annotation.GlitrForwardPagingArguments;
import com.nfl.glitr.annotation.GlitrQueryComplexity;
import com.nfl.glitr.data.mutation.Bitrate;
import java.util.List; | package com.nfl.glitr.data.query;
public class Video extends AbstractContent implements Playable {
private String id;
private String url; | // Path: src/test/groovy/com/nfl/glitr/data/mutation/Bitrate.java
// public class Bitrate implements Playable {
//
// private String id;
// private Integer kbps;
// private String url;
// private Integer[] frames;
// private Float gradeAverage;
// private Double grade;
// private Long durat... | private List<Bitrate> bitrateList; |
nfl/glitr | src/main/java/com/nfl/glitr/registry/datafetcher/query/batched/CompositeDataFetcherFactory.java | // Path: src/main/java/com/nfl/glitr/registry/datafetcher/query/CompositeDataFetcher.java
// public class CompositeDataFetcher extends AbstractCompositeDataFetcher {
//
// @SuppressWarnings("unused")
// private static final Logger logger = LoggerFactory.getLogger(CompositeDataFetcher.class);
//
//
// pub... | import com.nfl.glitr.registry.datafetcher.query.CompositeDataFetcher;
import com.nfl.glitr.registry.datafetcher.query.OverrideDataFetcher;
import graphql.schema.DataFetcher;
import java.util.List;
import java.util.stream.Collectors; | package com.nfl.glitr.registry.datafetcher.query.batched;
/**
* Create a CompositeDataFetcher based on the supplied DataFetchers.
*
*/
public class CompositeDataFetcherFactory {
public static DataFetcher create(final List<DataFetcher> supplied) {
List<DataFetcher> fetchers = supplied.stream()
... | // Path: src/main/java/com/nfl/glitr/registry/datafetcher/query/CompositeDataFetcher.java
// public class CompositeDataFetcher extends AbstractCompositeDataFetcher {
//
// @SuppressWarnings("unused")
// private static final Logger logger = LoggerFactory.getLogger(CompositeDataFetcher.class);
//
//
// pub... | .filter(f -> !(f instanceof OverrideDataFetcher) || ((OverrideDataFetcher)f).getOverrideMethod() != null) |
nfl/glitr | src/main/java/com/nfl/glitr/registry/datafetcher/query/batched/CompositeDataFetcherFactory.java | // Path: src/main/java/com/nfl/glitr/registry/datafetcher/query/CompositeDataFetcher.java
// public class CompositeDataFetcher extends AbstractCompositeDataFetcher {
//
// @SuppressWarnings("unused")
// private static final Logger logger = LoggerFactory.getLogger(CompositeDataFetcher.class);
//
//
// pub... | import com.nfl.glitr.registry.datafetcher.query.CompositeDataFetcher;
import com.nfl.glitr.registry.datafetcher.query.OverrideDataFetcher;
import graphql.schema.DataFetcher;
import java.util.List;
import java.util.stream.Collectors; | package com.nfl.glitr.registry.datafetcher.query.batched;
/**
* Create a CompositeDataFetcher based on the supplied DataFetchers.
*
*/
public class CompositeDataFetcherFactory {
public static DataFetcher create(final List<DataFetcher> supplied) {
List<DataFetcher> fetchers = supplied.stream()
... | // Path: src/main/java/com/nfl/glitr/registry/datafetcher/query/CompositeDataFetcher.java
// public class CompositeDataFetcher extends AbstractCompositeDataFetcher {
//
// @SuppressWarnings("unused")
// private static final Logger logger = LoggerFactory.getLogger(CompositeDataFetcher.class);
//
//
// pub... | return new CompositeDataFetcher(fetchers); |
nfl/glitr | src/main/java/com/nfl/glitr/registry/GlitrTypeMap.java | // Path: src/main/java/com/nfl/glitr/exception/GlitrException.java
// public class GlitrException extends RuntimeException {
//
// public GlitrException(String message) {
// super(message);
// }
//
// public GlitrException(String message, Throwable cause) {
// super(message, cause);
// ... | import com.nfl.glitr.exception.GlitrException;
import graphql.schema.GraphQLType;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap; | package com.nfl.glitr.registry;
/**
* A map implementation to sync the two kinds of registries currently in {@link com.nfl.glitr.registry.TypeRegistry}.
* Syncs happen dynamically, keeping the nameRegistry appraised of classRegistry additions to ensure unique GraphQLTypes
*/
public class GlitrTypeMap implements C... | // Path: src/main/java/com/nfl/glitr/exception/GlitrException.java
// public class GlitrException extends RuntimeException {
//
// public GlitrException(String message) {
// super(message);
// }
//
// public GlitrException(String message, Throwable cause) {
// super(message, cause);
// ... | throw new GlitrException("Unsupported type passed as key to GlitrTypeMap"); |
nfl/glitr | src/main/java/com/nfl/glitr/registry/TypeRegistryBuilder.java | // Path: src/main/java/com/nfl/glitr/registry/datafetcher/AnnotationBasedDataFetcherFactory.java
// public interface AnnotationBasedDataFetcherFactory {
//
// DataFetcher create(@Nullable Field field, @Nonnull Method method, @Nonnull Class declaringClass, @Nonnull Annotation annotation);
// }
//
// Path: src/main... | import com.nfl.glitr.registry.datafetcher.AnnotationBasedDataFetcherFactory;
import com.nfl.glitr.relay.Relay;
import com.nfl.glitr.relay.RelayConfig;
import graphql.schema.DataFetcher;
import graphql.schema.GraphQLArgument;
import graphql.schema.GraphQLOutputType;
import graphql.schema.GraphQLType;
import rx.functions... | package com.nfl.glitr.registry;
public class TypeRegistryBuilder {
private Map<Class, List<Object>> overrides = new HashMap<>();
private Map<Class<? extends Annotation>, Func4<Field, Method, Class, Annotation, List<GraphQLArgument>>> annotationToArgumentsProviderMap = new HashMap<>();
private Map<Class<... | // Path: src/main/java/com/nfl/glitr/registry/datafetcher/AnnotationBasedDataFetcherFactory.java
// public interface AnnotationBasedDataFetcherFactory {
//
// DataFetcher create(@Nullable Field field, @Nonnull Method method, @Nonnull Class declaringClass, @Nonnull Annotation annotation);
// }
//
// Path: src/main... | private Map<Class<? extends Annotation>, AnnotationBasedDataFetcherFactory> annotationToDataFetcherFactoryMap = new HashMap<>(); |
nfl/glitr | src/main/java/com/nfl/glitr/registry/TypeRegistryBuilder.java | // Path: src/main/java/com/nfl/glitr/registry/datafetcher/AnnotationBasedDataFetcherFactory.java
// public interface AnnotationBasedDataFetcherFactory {
//
// DataFetcher create(@Nullable Field field, @Nonnull Method method, @Nonnull Class declaringClass, @Nonnull Annotation annotation);
// }
//
// Path: src/main... | import com.nfl.glitr.registry.datafetcher.AnnotationBasedDataFetcherFactory;
import com.nfl.glitr.relay.Relay;
import com.nfl.glitr.relay.RelayConfig;
import graphql.schema.DataFetcher;
import graphql.schema.GraphQLArgument;
import graphql.schema.GraphQLOutputType;
import graphql.schema.GraphQLType;
import rx.functions... | package com.nfl.glitr.registry;
public class TypeRegistryBuilder {
private Map<Class, List<Object>> overrides = new HashMap<>();
private Map<Class<? extends Annotation>, Func4<Field, Method, Class, Annotation, List<GraphQLArgument>>> annotationToArgumentsProviderMap = new HashMap<>();
private Map<Class<... | // Path: src/main/java/com/nfl/glitr/registry/datafetcher/AnnotationBasedDataFetcherFactory.java
// public interface AnnotationBasedDataFetcherFactory {
//
// DataFetcher create(@Nullable Field field, @Nonnull Method method, @Nonnull Class declaringClass, @Nonnull Annotation annotation);
// }
//
// Path: src/main... | private Relay relay = null; |
nfl/glitr | src/main/java/com/nfl/glitr/registry/TypeRegistryBuilder.java | // Path: src/main/java/com/nfl/glitr/registry/datafetcher/AnnotationBasedDataFetcherFactory.java
// public interface AnnotationBasedDataFetcherFactory {
//
// DataFetcher create(@Nullable Field field, @Nonnull Method method, @Nonnull Class declaringClass, @Nonnull Annotation annotation);
// }
//
// Path: src/main... | import com.nfl.glitr.registry.datafetcher.AnnotationBasedDataFetcherFactory;
import com.nfl.glitr.relay.Relay;
import com.nfl.glitr.relay.RelayConfig;
import graphql.schema.DataFetcher;
import graphql.schema.GraphQLArgument;
import graphql.schema.GraphQLOutputType;
import graphql.schema.GraphQLType;
import rx.functions... | package com.nfl.glitr.registry;
public class TypeRegistryBuilder {
private Map<Class, List<Object>> overrides = new HashMap<>();
private Map<Class<? extends Annotation>, Func4<Field, Method, Class, Annotation, List<GraphQLArgument>>> annotationToArgumentsProviderMap = new HashMap<>();
private Map<Class<... | // Path: src/main/java/com/nfl/glitr/registry/datafetcher/AnnotationBasedDataFetcherFactory.java
// public interface AnnotationBasedDataFetcherFactory {
//
// DataFetcher create(@Nullable Field field, @Nonnull Method method, @Nonnull Class declaringClass, @Nonnull Annotation annotation);
// }
//
// Path: src/main... | private boolean explicitRelayNodeScanEnabled = RelayConfig.EXPLICIT_RELAY_NODE_SCAN_DEFAULT; |
nfl/glitr | src/test/groovy/com/nfl/glitr/data/query/additionalTypes/QueryRoot.java | // Path: src/test/groovy/com/nfl/glitr/data/query/PublishType.java
// public enum PublishType {
// PUBLISHED, UNPUBLISHED, UNLISTED
// }
//
// Path: src/test/groovy/com/nfl/glitr/data/query/Video.java
// public class Video extends AbstractContent implements Playable {
//
// private String id;
// private S... | import com.nfl.glitr.annotation.GlitrArgument;
import com.nfl.glitr.data.query.PublishType;
import com.nfl.glitr.data.query.Video;
import java.util.List; | package com.nfl.glitr.data.query.additionalTypes;
public class QueryRoot {
public Person getPerson() {
return null;
}
@GlitrArgument(name = "video_default", defaultValue = "No Default Value", type = String.class, required = true) | // Path: src/test/groovy/com/nfl/glitr/data/query/PublishType.java
// public enum PublishType {
// PUBLISHED, UNPUBLISHED, UNLISTED
// }
//
// Path: src/test/groovy/com/nfl/glitr/data/query/Video.java
// public class Video extends AbstractContent implements Playable {
//
// private String id;
// private S... | public List<Video> getDefaultVideo() { |
nfl/glitr | src/test/groovy/com/nfl/glitr/data/query/additionalTypes/QueryRoot.java | // Path: src/test/groovy/com/nfl/glitr/data/query/PublishType.java
// public enum PublishType {
// PUBLISHED, UNPUBLISHED, UNLISTED
// }
//
// Path: src/test/groovy/com/nfl/glitr/data/query/Video.java
// public class Video extends AbstractContent implements Playable {
//
// private String id;
// private S... | import com.nfl.glitr.annotation.GlitrArgument;
import com.nfl.glitr.data.query.PublishType;
import com.nfl.glitr.data.query.Video;
import java.util.List; | package com.nfl.glitr.data.query.additionalTypes;
public class QueryRoot {
public Person getPerson() {
return null;
}
@GlitrArgument(name = "video_default", defaultValue = "No Default Value", type = String.class, required = true)
public List<Video> getDefaultVideo() {
return null;
... | // Path: src/test/groovy/com/nfl/glitr/data/query/PublishType.java
// public enum PublishType {
// PUBLISHED, UNPUBLISHED, UNLISTED
// }
//
// Path: src/test/groovy/com/nfl/glitr/data/query/Video.java
// public class Video extends AbstractContent implements Playable {
//
// private String id;
// private S... | @GlitrArgument(name = "video_enum", defaultValue = "PUBLISHED", type = PublishType.class, required = true) |
nighthary/phoneContact | Contacts_1.1.0/src/com/night/contact/contact/Utils.java | // Path: Contacts_1.1.0/src/com/night/contact/bean/SortEntry.java
// public class SortEntry implements Parcelable{
// public String mID; // ÔÚÊý¾Ý¿âÖеÄIDºÅ
// public String mName; // ÐÕÃû
// public String mPY; // ÐÕÃûÆ´Òô
// public String mNum; // µç»°ºÅÂë
// public String mFisrtSpell; // ÖÐÎÄÃûÊ××Öĸ Àý:ÕÅÑ©±ù:z... | import java.util.ArrayList;
import android.content.ContentUris;
import android.content.ContentValues;
import android.content.Context;
import android.net.Uri;
import android.provider.ContactsContract;
import android.provider.ContactsContract.CommonDataKinds.Phone;
import android.provider.ContactsContract.CommonDataKinds... | package com.night.contact.contact;
/**
* database²Ù×÷Àà
* @deprecated
* @author NightHary
*
*/
public class Utils {
public static Context m_context;
//ËùÓÐÁªÏµÈ˵ÄÊý¾Ýlist | // Path: Contacts_1.1.0/src/com/night/contact/bean/SortEntry.java
// public class SortEntry implements Parcelable{
// public String mID; // ÔÚÊý¾Ý¿âÖеÄIDºÅ
// public String mName; // ÐÕÃû
// public String mPY; // ÐÕÃûÆ´Òô
// public String mNum; // µç»°ºÅÂë
// public String mFisrtSpell; // ÖÐÎÄÃûÊ××Öĸ Àý:ÕÅÑ©±ù:z... | public static ArrayList<SortEntry> mPersons = new ArrayList<SortEntry>(); |
nighthary/phoneContact | Contacts_1.1.0/src/com/night/contact/util/PinyinUtils.java | // Path: Contacts_1.1.0/src/com/night/contact/util/HanziToPinyin.java
// public static class Token {
// /**
// * Separator between target string for each source char
// */
// public static final String SEPARATOR = " ";
//
// public static final int LATIN = 1;
// public static final int PINYIN... | import java.util.ArrayList;
import net.sourceforge.pinyin4j.PinyinHelper;
import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;
import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType;
i... | * ºº×Öת»»ÎªººÓïÆ´ÒôÊ××Öĸ£¬Ó¢ÎÄ×Ö·û²»±ä
* »¨»¨´óÉñ->hhds
* @param chines
* ºº×Ö
* @return Æ´Òô
*/
public static String getFirstSpell(String chinese) {
StringBuffer pybf = new StringBuffer();
char[] arr = chinese.toCharArray();
HanyuPinyinOutputFormat... | // Path: Contacts_1.1.0/src/com/night/contact/util/HanziToPinyin.java
// public static class Token {
// /**
// * Separator between target string for each source char
// */
// public static final String SEPARATOR = " ";
//
// public static final int LATIN = 1;
// public static final int PINYIN... | ArrayList<Token> tokens = HanziToPinyin.getInstance().get(input); |
nighthary/phoneContact | Contacts_1.1.0/src/com/night/contact/contact/ContactsCursorAdapter.java | // Path: Contacts_1.1.0/src/com/night/contact/util/PinyinUtils.java
// public class PinyinUtils {
// /**
// * ½«×Ö·û´®ÖеÄÖÐÎÄת»¯ÎªÆ´Òô,ÆäËû×Ö·û²»±ä
// * @param inputString
// * @return
// */
// public static String getPingYin(String inputString) {
// HanyuPinyinOutputFormat format = new HanyuPinyinOutputF... | import java.io.InputStream;
import android.annotation.SuppressLint;
import android.content.ContentUris;
import android.content.Context;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.provider.ContactsContract;
import android.... | @Override
public void bindView(View view, Context context, Cursor cursor) {
if(cursor == null)
{
return;
}
TextView name = (TextView) view.findViewById(R.id.contacts_name);
name.setText(cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME)));
... | // Path: Contacts_1.1.0/src/com/night/contact/util/PinyinUtils.java
// public class PinyinUtils {
// /**
// * ½«×Ö·û´®ÖеÄÖÐÎÄת»¯ÎªÆ´Òô,ÆäËû×Ö·û²»±ä
// * @param inputString
// * @return
// */
// public static String getPingYin(String inputString) {
// HanyuPinyinOutputFormat format = new HanyuPinyinOutputF... | String firstLetter = PinyinUtils.getPingYin(cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME))).substring(0,1).toUpperCase(); |
nighthary/phoneContact | Contacts_1.1.0/src/com/night/contact/util/Tools.java | // Path: Contacts_1.1.0/src/com/night/contact/bean/SortEntry.java
// public class SortEntry implements Parcelable{
// public String mID; // ÔÚÊý¾Ý¿âÖеÄIDºÅ
// public String mName; // ÐÕÃû
// public String mPY; // ÐÕÃûÆ´Òô
// public String mNum; // µç»°ºÅÂë
// public String mFisrtSpell; // ÖÐÎÄÃûÊ××Öĸ Àý:ÕÅÑ©±ù:z... | import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import android.content.Context;
import android.os.Environment;
import android.widget.Spinner;
import android.widget.SpinnerAdapter;
import android.widget.Toast;... | String[] numbers;
numbers = phoneNumber.split("#");
return numbers;
}
/**
* ´òÓ¡ÏûÏ¢
*
* @param context
* ÉÏÏÂÎÄ
* @param message
* ´òÓ¡µÄÏûÏ¢ÄÚÈÝ
*/
public static void Toast(Context context, String message) {
Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
... | // Path: Contacts_1.1.0/src/com/night/contact/bean/SortEntry.java
// public class SortEntry implements Parcelable{
// public String mID; // ÔÚÊý¾Ý¿âÖеÄIDºÅ
// public String mName; // ÐÕÃû
// public String mPY; // ÐÕÃûÆ´Òô
// public String mNum; // µç»°ºÅÂë
// public String mFisrtSpell; // ÖÐÎÄÃûÊ××Öĸ Àý:ÕÅÑ©±ù:z... | public static List<SortEntry> duplicateNum(List<SortEntry> entrys) { |
nighthary/phoneContact | Contacts_1.1.0/src/com/night/contact/util/SerializableMap.java | // Path: Contacts_1.1.0/src/com/night/contact/bean/SortEntry.java
// public class SortEntry implements Parcelable{
// public String mID; // ÔÚÊý¾Ý¿âÖеÄIDºÅ
// public String mName; // ÐÕÃû
// public String mPY; // ÐÕÃûÆ´Òô
// public String mNum; // µç»°ºÅÂë
// public String mFisrtSpell; // ÖÐÎÄÃûÊ××Öĸ Àý:ÕÅÑ©±ù:z... | import java.io.Serializable;
import java.util.Map;
import com.night.contact.bean.SortEntry; | package com.night.contact.util;
public class SerializableMap implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
| // Path: Contacts_1.1.0/src/com/night/contact/bean/SortEntry.java
// public class SortEntry implements Parcelable{
// public String mID; // ÔÚÊý¾Ý¿âÖеÄIDºÅ
// public String mName; // ÐÕÃû
// public String mPY; // ÐÕÃûÆ´Òô
// public String mNum; // µç»°ºÅÂë
// public String mFisrtSpell; // ÖÐÎÄÃûÊ××Öĸ Àý:ÕÅÑ©±ù:z... | private Map<String,SortEntry> map; |
nighthary/phoneContact | Contacts_1.1.0/src/com/night/contact/adapter/GroupAdapter.java | // Path: Contacts_1.1.0/src/com/night/contact/bean/GroupBean.java
// public class GroupBean implements Parcelable{
//
// private int id;
// private String name;
// private int count;
//
// public GroupBean() {
// super();
// }
// public GroupBean(int id, String name) {
// super();
// this.id = id;
// t... | import java.util.List;
import android.annotation.SuppressLint;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.night.contact.bean.GroupBean;
import com.night.contact.ui.R; | package com.night.contact.adapter;
/**
* ±êÌâÀ¸ÏÂÀ²Ëµ¥Ñ¡ÏîÊÊÅäÆ÷
* @author NightHary
*
*/
public class GroupAdapter extends BaseAdapter {
private Context context ; | // Path: Contacts_1.1.0/src/com/night/contact/bean/GroupBean.java
// public class GroupBean implements Parcelable{
//
// private int id;
// private String name;
// private int count;
//
// public GroupBean() {
// super();
// }
// public GroupBean(int id, String name) {
// super();
// this.id = id;
// t... | private List<GroupBean> groupList; |
nighthary/phoneContact | Contacts_1.1.0/src/com/night/contact/DAO/GroupDAO.java | // Path: Contacts_1.1.0/src/com/night/contact/bean/GroupBean.java
// public class GroupBean implements Parcelable{
//
// private int id;
// private String name;
// private int count;
//
// public GroupBean() {
// super();
// }
// public GroupBean(int id, String name) {
// super();
// this.id = id;
// t... | import java.util.ArrayList;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.provider.ContactsContract;
import android.provider.ContactsContract.Groups;
import com.night.contact.bean.GroupBean; | package com.night.contact.DAO;
/**
* Ⱥ×é²Ù×÷³Ö¾Ã²ã
*
* @author NightHary
*
*/
public class GroupDAO {
private Context context;
public GroupDAO(Context context) {
this.context = context;
}
/**
* »ñÈ¡ËùÓÐÁªÏµÈË·Ö×é
*
* @param context
* ÉÏÏÂÎÄ
* @return
*/ | // Path: Contacts_1.1.0/src/com/night/contact/bean/GroupBean.java
// public class GroupBean implements Parcelable{
//
// private int id;
// private String name;
// private int count;
//
// public GroupBean() {
// super();
// }
// public GroupBean(int id, String name) {
// super();
// this.id = id;
// t... | public ArrayList<GroupBean> getGroups() { |
nighthary/phoneContact | Contacts_1.1.0/src/com/night/contact/adapter/FilterAdapter.java | // Path: Contacts_1.1.0/src/com/night/contact/bean/SortEntry.java
// public class SortEntry implements Parcelable{
// public String mID; // ÔÚÊý¾Ý¿âÖеÄIDºÅ
// public String mName; // ÐÕÃû
// public String mPY; // ÐÕÃûÆ´Òô
// public String mNum; // µç»°ºÅÂë
// public String mFisrtSpell; // ÖÐÎÄÃûÊ××Öĸ Àý:ÕÅÑ©±ù:z... | import java.io.InputStream;
import java.util.ArrayList;
import android.annotation.SuppressLint;
import android.content.ContentUris;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.provider.ContactsContract;
import android.view... | package com.night.contact.adapter;
/**
* ÁªÏµÈ˹ýÂËÊÊÅäÆ÷
* @author NightHary
*
*/
@SuppressLint({ "ViewHolder", "InflateParams" })
public class FilterAdapter extends BaseAdapter{
private LayoutInflater mInflater; | // Path: Contacts_1.1.0/src/com/night/contact/bean/SortEntry.java
// public class SortEntry implements Parcelable{
// public String mID; // ÔÚÊý¾Ý¿âÖеÄIDºÅ
// public String mName; // ÐÕÃû
// public String mPY; // ÐÕÃûÆ´Òô
// public String mNum; // µç»°ºÅÂë
// public String mFisrtSpell; // ÖÐÎÄÃûÊ××Öĸ Àý:ÕÅÑ©±ù:z... | private ArrayList<SortEntry> data; |
Comcast/flume2storm | static-location-service/src/main/java/com/comcast/viper/flume2storm/location/StaticLocationService.java | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | import org.apache.commons.configuration.Configuration;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.comcast.viper.flume2storm.F2SConfigurationException;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableList.Build... | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | throws F2SConfigurationException { |
Comcast/flume2storm | test-impl/src/main/java/com/comcast/viper/flume2storm/zookeeper/ZkTestServer.java | // Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test/TestUtils.java
// public class TestUtils {
// private static final int DEFAULT_RETRY_TIMEOUT = 100;
// private static Random random = new Random();
//
// /**
// * @return An ephemeral port available for test usage
// */
// public s... | import java.io.File;
import java.io.IOException;
import org.apache.commons.io.FileUtils;
import org.apache.zookeeper.server.ServerCnxnFactory;
import org.apache.zookeeper.server.ServerConfig;
import org.apache.zookeeper.server.ZooKeeperServer;
import org.apache.zookeeper.server.persistence.FileTxnSnapLog;
import org.sl... | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test/TestUtils.java
// public class TestUtils {
// private static final int DEFAULT_RETRY_TIMEOUT = 100;
// private static Random random = new Random();
//
// /**
// * @return An ephemeral port available for test usage
// */
// public s... | this(TestUtils.getAvailablePort(), TICKTIME_DEFAULT); |
Comcast/flume2storm | flume-spout/src/main/java/com/comcast/viper/flume2storm/spout/F2SEventEmitter.java | // Path: core/src/main/java/com/comcast/viper/flume2storm/event/F2SEvent.java
// public final class F2SEvent implements Serializable {
// private static final long serialVersionUID = -5906404402187281472L;
// private final Map<String, String> headers;
// private final byte[] body;
//
// F2SEvent() {
// hea... | import java.io.Serializable;
import backtype.storm.spout.SpoutOutputCollector;
import backtype.storm.topology.OutputFieldsDeclarer;
import com.comcast.viper.flume2storm.event.F2SEvent; | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: core/src/main/java/com/comcast/viper/flume2storm/event/F2SEvent.java
// public final class F2SEvent implements Serializable {
// private static final long serialVersionUID = -5906404402187281472L;
// private final Map<String, String> headers;
// private final byte[] body;
//
// F2SEvent() {
// hea... | public void emitEvent(F2SEvent event, SpoutOutputCollector collector); |
Comcast/flume2storm | core/src/main/java/com/comcast/viper/flume2storm/connection/receptor/EventReceptorListener.java | // Path: core/src/main/java/com/comcast/viper/flume2storm/event/F2SEvent.java
// public final class F2SEvent implements Serializable {
// private static final long serialVersionUID = -5906404402187281472L;
// private final Map<String, String> headers;
// private final byte[] body;
//
// F2SEvent() {
// hea... | import java.util.List;
import com.comcast.viper.flume2storm.event.F2SEvent; | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: core/src/main/java/com/comcast/viper/flume2storm/event/F2SEvent.java
// public final class F2SEvent implements Serializable {
// private static final long serialVersionUID = -5906404402187281472L;
// private final Map<String, String> headers;
// private final byte[] body;
//
// F2SEvent() {
// hea... | void onEvent(List<F2SEvent> events); |
Comcast/flume2storm | test-impl/src/main/java/com/comcast/viper/flume2storm/connection/receptor/EventReceptorTestUtils.java | // Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test/TestCondition.java
// public interface TestCondition {
// /**
// * @return True when the condition is fulfilled, false otherwise
// */
// boolean evaluate();
// }
//
// Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test... | import com.comcast.viper.flume2storm.utility.test.TestCondition;
import com.comcast.viper.flume2storm.utility.test.TestUtils; | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test/TestCondition.java
// public interface TestCondition {
// /**
// * @return True when the condition is fulfilled, false otherwise
// */
// boolean evaluate();
// }
//
// Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test... | static class EventReceptorConnected implements TestCondition { |
Comcast/flume2storm | test-impl/src/main/java/com/comcast/viper/flume2storm/connection/receptor/EventReceptorTestUtils.java | // Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test/TestCondition.java
// public interface TestCondition {
// /**
// * @return True when the condition is fulfilled, false otherwise
// */
// boolean evaluate();
// }
//
// Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test... | import com.comcast.viper.flume2storm.utility.test.TestCondition;
import com.comcast.viper.flume2storm.utility.test.TestUtils; | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test/TestCondition.java
// public interface TestCondition {
// /**
// * @return True when the condition is fulfilled, false otherwise
// */
// boolean evaluate();
// }
//
// Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test... | if (!TestUtils.waitFor(new EventReceptorConnected(eventReceptor), timeout)) { |
Comcast/flume2storm | kryonet-flume2storm/src/main/java/com/comcast/viper/flume2storm/connection/sender/KryoNetSimpleRealtimeStrategy.java | // Path: core/src/main/java/com/comcast/viper/flume2storm/event/F2SEvent.java
// public final class F2SEvent implements Serializable {
// private static final long serialVersionUID = -5906404402187281472L;
// private final Map<String, String> headers;
// private final byte[] body;
//
// F2SEvent() {
// hea... | import java.io.Serializable;
import java.util.Iterator;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.comcast.viper.flume2storm.event.F2SEvent;
import com.esotericsoftware.kryonet.Connection;
import com.google.common.base.Preconditions; | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: core/src/main/java/com/comcast/viper/flume2storm/event/F2SEvent.java
// public final class F2SEvent implements Serializable {
// private static final long serialVersionUID = -5906404402187281472L;
// private final Map<String, String> headers;
// private final byte[] body;
//
// F2SEvent() {
// hea... | public int send(List<F2SEvent> events) { |
Comcast/flume2storm | integration-tests/src/main/java/com/comcast/viper/flume2storm/example/ExampleStringEmitter.java | // Path: core/src/main/java/com/comcast/viper/flume2storm/event/F2SEvent.java
// public final class F2SEvent implements Serializable {
// private static final long serialVersionUID = -5906404402187281472L;
// private final Map<String, String> headers;
// private final byte[] body;
//
// F2SEvent() {
// hea... | import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import backtype.storm.spout.SpoutOutputCollector;
import backtype.storm.topology.OutputFieldsDeclarer;
import backtype.storm.tuple.Fields;
import com.comcast.viper.flume2storm.event.F2SEv... | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: core/src/main/java/com/comcast/viper/flume2storm/event/F2SEvent.java
// public final class F2SEvent implements Serializable {
// private static final long serialVersionUID = -5906404402187281472L;
// private final Map<String, String> headers;
// private final byte[] body;
//
// F2SEvent() {
// hea... | public void emitEvent(F2SEvent event, SpoutOutputCollector collector) { |
Comcast/flume2storm | kryonet-flume2storm/src/main/java/com/comcast/viper/flume2storm/connection/parameters/KryoNetConnectionParameters.java | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | import java.io.Serializable;
import java.net.InetAddress;
import java.net.UnknownHostException;
import org.apache.commons.configuration.Configuration;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
... | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | public static KryoNetConnectionParameters from(Configuration config) throws F2SConfigurationException { |
Comcast/flume2storm | test-impl/src/main/java/com/comcast/viper/flume2storm/connection/sender/EventSenderTestUtils.java | // Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test/TestCondition.java
// public interface TestCondition {
// /**
// * @return True when the condition is fulfilled, false otherwise
// */
// boolean evaluate();
// }
//
// Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test... | import com.comcast.viper.flume2storm.utility.test.TestCondition;
import com.comcast.viper.flume2storm.utility.test.TestUtils; | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test/TestCondition.java
// public interface TestCondition {
// /**
// * @return True when the condition is fulfilled, false otherwise
// */
// boolean evaluate();
// }
//
// Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test... | static class NoReceptorCondition implements TestCondition { |
Comcast/flume2storm | test-impl/src/main/java/com/comcast/viper/flume2storm/connection/sender/EventSenderTestUtils.java | // Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test/TestCondition.java
// public interface TestCondition {
// /**
// * @return True when the condition is fulfilled, false otherwise
// */
// boolean evaluate();
// }
//
// Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test... | import com.comcast.viper.flume2storm.utility.test.TestCondition;
import com.comcast.viper.flume2storm.utility.test.TestUtils; | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test/TestCondition.java
// public interface TestCondition {
// /**
// * @return True when the condition is fulfilled, false otherwise
// */
// boolean evaluate();
// }
//
// Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test... | if (!TestUtils.waitFor(new NoReceptorCondition(sender), timeout)) { |
Comcast/flume2storm | dynamic-location-service/src/test/java/com/comcast/viper/flume2storm/zookeeper/ZkTestUtils.java | // Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test/TestCondition.java
// public interface TestCondition {
// /**
// * @return True when the condition is fulfilled, false otherwise
// */
// boolean evaluate();
// }
//
// Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test... | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.Socket;
import org.apache.commons.lang.StringUtils;
import com.comcast.viper.flume2storm.utility.test.TestCondition;
import com.comcast.viper.flume2storm.utility.test.TestUtils;
import com.google.common.base.Pr... | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test/TestCondition.java
// public interface TestCondition {
// /**
// * @return True when the condition is fulfilled, false otherwise
// */
// boolean evaluate();
// }
//
// Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test... | public static final int PORT = TestUtils.getAvailablePort(); |
Comcast/flume2storm | dynamic-location-service/src/test/java/com/comcast/viper/flume2storm/zookeeper/ZkTestUtils.java | // Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test/TestCondition.java
// public interface TestCondition {
// /**
// * @return True when the condition is fulfilled, false otherwise
// */
// boolean evaluate();
// }
//
// Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test... | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.net.Socket;
import org.apache.commons.lang.StringUtils;
import com.comcast.viper.flume2storm.utility.test.TestCondition;
import com.comcast.viper.flume2storm.utility.test.TestUtils;
import com.google.common.base.Pr... | final Socket sock = new Socket(host, port);
OutputStream outstream = null;
BufferedReader reader = null;
try {
outstream = sock.getOutputStream();
outstream.write(cmd.getBytes());
outstream.flush();
reader = new BufferedReader(new InputStreamReader(sock.getInputS... | // Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test/TestCondition.java
// public interface TestCondition {
// /**
// * @return True when the condition is fulfilled, false otherwise
// */
// boolean evaluate();
// }
//
// Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test... | public static final TestCondition ZK_IS_ON = new TestCondition() { |
Comcast/flume2storm | test-impl/src/test/java/com/comcast/viper/flume2storm/location/TestSimpleLocationService.java | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test;
import com.comcast.viper.flume2storm.F2SConfigurationException; | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | public void testWithListeners() throws F2SConfigurationException { |
Comcast/flume2storm | dynamic-location-service/src/main/java/com/comcast/viper/flume2storm/zookeeper/ZkClientConfiguration.java | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | import java.io.Serializable;
import org.apache.commons.configuration.Configuration;
import com.comcast.viper.flume2storm.F2SConfigurationException;
import com.google.common.base.Preconditions; | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | public static ZkClientConfiguration from(Configuration config) throws F2SConfigurationException { |
Comcast/flume2storm | kryo-utils/src/main/java/com/comcast/viper/flume2storm/KryoUtil.java | // Path: core/src/main/java/com/comcast/viper/flume2storm/event/F2SEvent.java
// public final class F2SEvent implements Serializable {
// private static final long serialVersionUID = -5906404402187281472L;
// private final Map<String, String> headers;
// private final byte[] body;
//
// F2SEvent() {
// hea... | import com.comcast.viper.flume2storm.event.F2SEvent;
import com.esotericsoftware.kryo.Kryo; | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: core/src/main/java/com/comcast/viper/flume2storm/event/F2SEvent.java
// public final class F2SEvent implements Serializable {
// private static final long serialVersionUID = -5906404402187281472L;
// private final Map<String, String> headers;
// private final byte[] body;
//
// F2SEvent() {
// hea... | kryo.register(F2SEvent.class, new F2SEventSerializer()); |
Comcast/flume2storm | dynamic-location-service/src/main/java/com/comcast/viper/flume2storm/location/DynamicLocationServiceFactory.java | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | import org.apache.commons.configuration.Configuration;
import com.comcast.viper.flume2storm.F2SConfigurationException; | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | throws F2SConfigurationException { |
Comcast/flume2storm | utility/src/test/java/com/comcast/viper/flume2storm/utility/test/TestUtilsTest.java | // Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/Constants.java
// public interface Constants {
// /**
// * The maximum unsigned short value
// */
// int MAX_UNSIGNED_SHORT = 0xFFFF;
// }
| import java.util.concurrent.atomic.AtomicBoolean;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.comcast.viper.flume2storm.utility.Constants; | final Thread thread = new TestThread();
thread.start();
LOG.debug("Waiting for condition (thread terminated)...");
TestUtils.waitFor(new MyTestCondition(), DURATION / 2);
}
/**
* Test {@link TestUtils#waitFor(TestCondition, int)} success
*
* @throws InterruptedException
* If ... | // Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/Constants.java
// public interface Constants {
// /**
// * The maximum unsigned short value
// */
// int MAX_UNSIGNED_SHORT = 0xFFFF;
// }
// Path: utility/src/test/java/com/comcast/viper/flume2storm/utility/test/TestUtilsTest.java
import ... | Assert.assertTrue(port1 < Constants.MAX_UNSIGNED_SHORT); |
Comcast/flume2storm | kryonet-flume2storm/src/main/java/com/comcast/viper/flume2storm/connection/parameters/KryoNetConnectionParametersFactory.java | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | import org.apache.commons.configuration.Configuration;
import com.comcast.viper.flume2storm.F2SConfigurationException;
import com.comcast.viper.flume2storm.connection.parameters.ConnectionParametersFactory; | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | public KryoNetConnectionParameters create(Configuration config) throws F2SConfigurationException { |
Comcast/flume2storm | dynamic-location-service/src/test/java/com/comcast/viper/flume2storm/zookeeper/ZkClientConfigurationTest.java | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | import junit.framework.Assert;
import org.apache.commons.configuration.BaseConfiguration;
import org.apache.commons.configuration.Configuration;
import org.apache.commons.lang.StringUtils;
import org.junit.Test;
import com.comcast.viper.flume2storm.F2SConfigurationException; | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | public void testFromConfiguration() throws F2SConfigurationException { |
Comcast/flume2storm | core/src/main/java/com/comcast/viper/flume2storm/location/LocationServiceFactory.java | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | import org.apache.commons.configuration.Configuration;
import com.comcast.viper.flume2storm.F2SConfigurationException; | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | throws F2SConfigurationException; |
Comcast/flume2storm | flume-spout/src/test/java/com/comcast/viper/flume2storm/spout/MemoryStorage.java | // Path: core/src/main/java/com/comcast/viper/flume2storm/event/F2SEvent.java
// public final class F2SEvent implements Serializable {
// private static final long serialVersionUID = -5906404402187281472L;
// private final Map<String, String> headers;
// private final byte[] body;
//
// F2SEvent() {
// hea... | import java.util.SortedSet;
import java.util.TreeSet;
import com.comcast.viper.flume2storm.event.F2SEvent;
import com.comcast.viper.flume2storm.event.F2SEventComparator; | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: core/src/main/java/com/comcast/viper/flume2storm/event/F2SEvent.java
// public final class F2SEvent implements Serializable {
// private static final long serialVersionUID = -5906404402187281472L;
// private final Map<String, String> headers;
// private final byte[] body;
//
// F2SEvent() {
// hea... | protected SortedSet<F2SEvent> receivedEvents; |
Comcast/flume2storm | flume-spout/src/test/java/com/comcast/viper/flume2storm/spout/MemoryStorage.java | // Path: core/src/main/java/com/comcast/viper/flume2storm/event/F2SEvent.java
// public final class F2SEvent implements Serializable {
// private static final long serialVersionUID = -5906404402187281472L;
// private final Map<String, String> headers;
// private final byte[] body;
//
// F2SEvent() {
// hea... | import java.util.SortedSet;
import java.util.TreeSet;
import com.comcast.viper.flume2storm.event.F2SEvent;
import com.comcast.viper.flume2storm.event.F2SEventComparator; | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: core/src/main/java/com/comcast/viper/flume2storm/event/F2SEvent.java
// public final class F2SEvent implements Serializable {
// private static final long serialVersionUID = -5906404402187281472L;
// private final Map<String, String> headers;
// private final byte[] body;
//
// F2SEvent() {
// hea... | receivedEvents = new TreeSet<F2SEvent>(new F2SEventComparator()); |
Comcast/flume2storm | static-location-service/src/main/java/com/comcast/viper/flume2storm/location/StaticLocationServiceFactory.java | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | import org.apache.commons.configuration.Configuration;
import com.comcast.viper.flume2storm.F2SConfigurationException; | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | throws F2SConfigurationException { |
Comcast/flume2storm | dynamic-location-service/src/test/java/com/comcast/viper/flume2storm/location/DynamicLocationServiceConfigurationTest.java | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | import junit.framework.Assert;
import org.apache.commons.configuration.BaseConfiguration;
import org.apache.commons.configuration.Configuration;
import org.apache.commons.lang.StringUtils;
import org.junit.Ignore;
import org.junit.Test;
import com.comcast.viper.flume2storm.F2SConfigurationException; | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | public void testFromConfiguration() throws F2SConfigurationException { |
Comcast/flume2storm | kryonet-flume2storm/src/test/java/com/comcast/viper/flume2storm/connection/KryoNetParametersTest.java | // Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test/TestUtils.java
// public class TestUtils {
// private static final int DEFAULT_RETRY_TIMEOUT = 100;
// private static Random random = new Random();
//
// /**
// * @return An ephemeral port available for test usage
// */
// public s... | import junit.framework.Assert;
import org.apache.commons.configuration.BaseConfiguration;
import org.apache.commons.configuration.Configuration;
import org.junit.Test;
import com.comcast.viper.flume2storm.utility.test.TestUtils; | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test/TestUtils.java
// public class TestUtils {
// private static final int DEFAULT_RETRY_TIMEOUT = 100;
// private static Random random = new Random();
//
// /**
// * @return An ephemeral port available for test usage
// */
// public s... | int connectionTo = TestUtils.getRandomPositiveInt(100000); |
Comcast/flume2storm | storm-sink/src/test/java/com/comcast/viper/flume2storm/sink/EventConverterTest.java | // Path: core/src/main/java/com/comcast/viper/flume2storm/event/F2SEvent.java
// public final class F2SEvent implements Serializable {
// private static final long serialVersionUID = -5906404402187281472L;
// private final Map<String, String> headers;
// private final byte[] body;
//
// F2SEvent() {
// hea... | import static org.assertj.core.api.Assertions.assertThat;
import org.apache.flume.Event;
import org.apache.flume.event.EventBuilder;
import org.joda.time.Instant;
import org.junit.Test;
import com.comcast.viper.flume2storm.event.F2SEvent;
import com.google.common.collect.ImmutableMap; | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: core/src/main/java/com/comcast/viper/flume2storm/event/F2SEvent.java
// public final class F2SEvent implements Serializable {
// private static final long serialVersionUID = -5906404402187281472L;
// private final Map<String, String> headers;
// private final byte[] body;
//
// F2SEvent() {
// hea... | F2SEvent f2sEvent = converter.convert(event); |
Comcast/flume2storm | core/src/main/java/com/comcast/viper/flume2storm/connection/sender/EventSender.java | // Path: core/src/main/java/com/comcast/viper/flume2storm/connection/parameters/ConnectionParameters.java
// public interface ConnectionParameters {
// /**
// * @return A unique identifier of the associated {@link EventSender} /
// * {@link ServiceProvider} (hostname:port for instance)
// *
// */... | import java.util.List;
import com.comcast.viper.flume2storm.connection.parameters.ConnectionParameters;
import com.comcast.viper.flume2storm.event.F2SEvent;
import com.comcast.viper.flume2storm.location.ServiceProvider; | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: core/src/main/java/com/comcast/viper/flume2storm/connection/parameters/ConnectionParameters.java
// public interface ConnectionParameters {
// /**
// * @return A unique identifier of the associated {@link EventSender} /
// * {@link ServiceProvider} (hostname:port for instance)
// *
// */... | int send(List<F2SEvent> events); |
Comcast/flume2storm | dynamic-location-service/src/test/java/com/comcast/viper/flume2storm/zookeeper/ZkClientTestUtils.java | // Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test/TestCondition.java
// public interface TestCondition {
// /**
// * @return True when the condition is fulfilled, false otherwise
// */
// boolean evaluate();
// }
//
// Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test... | import junit.framework.Assert;
import com.comcast.viper.flume2storm.utility.test.TestCondition;
import com.comcast.viper.flume2storm.utility.test.TestUtils; | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test/TestCondition.java
// public interface TestCondition {
// /**
// * @return True when the condition is fulfilled, false otherwise
// */
// boolean evaluate();
// }
//
// Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test... | public static class ClientStartedCondition implements TestCondition { |
Comcast/flume2storm | dynamic-location-service/src/test/java/com/comcast/viper/flume2storm/zookeeper/ZkClientTestUtils.java | // Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test/TestCondition.java
// public interface TestCondition {
// /**
// * @return True when the condition is fulfilled, false otherwise
// */
// boolean evaluate();
// }
//
// Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test... | import junit.framework.Assert;
import com.comcast.viper.flume2storm.utility.test.TestCondition;
import com.comcast.viper.flume2storm.utility.test.TestUtils; | }
}
public static class ClientDisconnectedCondition implements TestCondition {
private final ZkClient zkClient;
public ClientDisconnectedCondition(final ZkClient zkClient) {
this.zkClient = zkClient;
}
@Override
public boolean evaluate() {
return !zkClient.getState().isConnect... | // Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test/TestCondition.java
// public interface TestCondition {
// /**
// * @return True when the condition is fulfilled, false otherwise
// */
// boolean evaluate();
// }
//
// Path: utility/src/main/java/com/comcast/viper/flume2storm/utility/test... | Assert.assertTrue(TestUtils.waitFor(new ClientStartedCondition(zkClient), timeout)); |
Comcast/flume2storm | test-impl/src/test/java/com/comcast/viper/flume2storm/location/TestServiceProviderManager.java | // Path: core/src/main/java/com/comcast/viper/flume2storm/location/ServiceProviderManager.java
// class ServiceProviderManager<SP extends ServiceProvider<?>> {
// private static final Logger LOG = LoggerFactory.getLogger(ServiceProviderManager.class);
// /** The one listener we'll notify (i.e. the location service)... | import java.util.ArrayList;
import java.util.List;
import junit.framework.Assert;
import org.junit.Test;
import com.comcast.viper.flume2storm.location.ServiceProviderManager; | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: core/src/main/java/com/comcast/viper/flume2storm/location/ServiceProviderManager.java
// class ServiceProviderManager<SP extends ServiceProvider<?>> {
// private static final Logger LOG = LoggerFactory.getLogger(ServiceProviderManager.class);
// /** The one listener we'll notify (i.e. the location service)... | ServiceProviderManager<SimpleServiceProvider> manager = new ServiceProviderManager<SimpleServiceProvider>(listener); |
Comcast/flume2storm | flume-spout/src/main/java/com/comcast/viper/flume2storm/spout/FlumeSpoutConfiguration.java | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | import com.google.common.base.Preconditions;
import com.google.common.base.Supplier;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.MapConfiguration;
import org.apache.... | }
/**
* Copy constructor
*
* @param other
* the configuration to copy
*/
public FlumeSpoutConfiguration(final FlumeSpoutConfiguration other) {
locationServiceFactoryClassName = other.locationServiceFactoryClassName;
serviceProviderSerializationClassName = other.serviceProviderSer... | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | Preconditions.checkArgument(LocationServiceFactory.class.isAssignableFrom(locationServiceFactoryClass), |
Comcast/flume2storm | test-impl/src/main/java/com/comcast/viper/flume2storm/connection/parameters/SimpleConnectionParametersFactory.java | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | import org.apache.commons.configuration.Configuration;
import com.comcast.viper.flume2storm.F2SConfigurationException; | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | public SimpleConnectionParameters create(Configuration config) throws F2SConfigurationException { |
Comcast/flume2storm | kryonet-flume2storm/src/main/java/com/comcast/viper/flume2storm/connection/KryoNetParameters.java | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | import java.io.Serializable;
import org.apache.commons.configuration.Configuration;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.c... | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | public static KryoNetParameters from(final Configuration config) throws F2SConfigurationException { |
Comcast/flume2storm | test-impl/src/main/java/com/comcast/viper/flume2storm/location/SimpleLocationServiceFactory.java | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | import org.apache.commons.configuration.Configuration;
import com.comcast.viper.flume2storm.F2SConfigurationException; | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | throws F2SConfigurationException { |
Comcast/flume2storm | static-location-service/src/main/java/com/comcast/viper/flume2storm/location/StaticLocationServiceConfiguration.java | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | import org.apache.commons.configuration.Configuration;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.comcast.viper.flume2storm.F2SC... | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | public static StaticLocationServiceConfiguration from(Configuration config) throws F2SConfigurationException { |
Comcast/flume2storm | static-location-service/src/test/java/com/comcast/viper/flume2storm/location/StaticLocationServiceConfigurationTest.java | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | import junit.framework.Assert;
import org.apache.commons.configuration.BaseConfiguration;
import org.apache.commons.configuration.Configuration;
import org.junit.Test;
import com.comcast.viper.flume2storm.F2SConfigurationException; | /**
* Copyright 2014 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | // Path: core/src/main/java/com/comcast/viper/flume2storm/F2SConfigurationException.java
// @SuppressWarnings("javadoc")
// public class F2SConfigurationException extends Exception {
// private static final long serialVersionUID = 4941423443352427505L;
//
// /**
// * @param config
// * The configura... | public void testFromConfiguration() throws F2SConfigurationException { |
opcoach/Conferences | ECF14/ecf14_files/step6-EngineControlPanel/DashBoard.java | // Path: ECF14/ecf14_files/step5-SimulatorEngine/EngineSimulator.java
// public class EngineSimulator {
//
// // Define the constants to get/set values from context
// public static final String ECF2014_SPEED_VALUE = "ecf2014.speedValue";
// public static final String ECF2014_RPM_VALUE = "ecf2014.rpmValue";
// pub... | import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.inject.Named;
import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.GridLayout;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.LightweightSystem;
import org.eclipse.draw2d.PositionConstan... | package com.opcoach.ecf14.eap.parts;
public class DashBoard
{
private GaugeFigure speedCounter;
private GaugeFigure rpmCounter;
private XYGraphMediaFactory gmfactory;
private Canvas canvas;
@Inject
public DashBoard(MApplication appli)
{
// Step 5 : create and start Engine. | // Path: ECF14/ecf14_files/step5-SimulatorEngine/EngineSimulator.java
// public class EngineSimulator {
//
// // Define the constants to get/set values from context
// public static final String ECF2014_SPEED_VALUE = "ecf2014.speedValue";
// public static final String ECF2014_RPM_VALUE = "ecf2014.rpmValue";
// pub... | EngineSimulator simu = ContextInjectionFactory.make(EngineSimulator.class, appli.getContext()); |
opcoach/Conferences | ECF14/ecf14_files/step9-AlarmViewer/AlarmPart.java | // Path: ECF14/ecf14_files/step8-EngineWatcher/Alarm.java
// public class Alarm
// {
// private Date when; private String what; private int value;
//
// public Alarm(String what, int value)
// {
// this.what = what;
// this.value = value;
// when = new Date();
// }
//
// public Date getWhen() { r... | import java.text.SimpleDateFormat;
import java.util.Vector;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.e4.ui.di.Focus;
import org.eclipse.e4.ui.di.UIEventTopic;
import org.eclipse.jface.viewers.ArrayContentProvider;
import or... | package com.opcoach.ecf2014.engine.ui.parts;
public class AlarmPart
{
@Optional
@Inject | // Path: ECF14/ecf14_files/step8-EngineWatcher/Alarm.java
// public class Alarm
// {
// private Date when; private String what; private int value;
//
// public Alarm(String what, int value)
// {
// this.what = what;
// this.value = value;
// when = new Date();
// }
//
// public Date getWhen() { r... | private EngineWatcher engineWatcher; |
opcoach/Conferences | ECF14/ecf14_files/step9-AlarmViewer/AlarmPart.java | // Path: ECF14/ecf14_files/step8-EngineWatcher/Alarm.java
// public class Alarm
// {
// private Date when; private String what; private int value;
//
// public Alarm(String what, int value)
// {
// this.what = what;
// this.value = value;
// when = new Date();
// }
//
// public Date getWhen() { r... | import java.text.SimpleDateFormat;
import java.util.Vector;
import javax.annotation.PostConstruct;
import javax.inject.Inject;
import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.e4.ui.di.Focus;
import org.eclipse.e4.ui.di.UIEventTopic;
import org.eclipse.jface.viewers.ArrayContentProvider;
import or... | package com.opcoach.ecf2014.engine.ui.parts;
public class AlarmPart
{
@Optional
@Inject
private EngineWatcher engineWatcher;
| // Path: ECF14/ecf14_files/step8-EngineWatcher/Alarm.java
// public class Alarm
// {
// private Date when; private String what; private int value;
//
// public Alarm(String what, int value)
// {
// this.what = what;
// this.value = value;
// when = new Date();
// }
//
// public Date getWhen() { r... | Vector<Alarm> alarms = new Vector<Alarm>(); |
opcoach/Conferences | ECF14/com.opcoach.ecf2014.engine.ui/src/com/opcoach/ecf2014/engine/ui/parts/DashBoard.java | // Path: ECF14/ecf14_files/step5-SimulatorEngine/EngineSimulator.java
// public class EngineSimulator {
//
// // Define the constants to get/set values from context
// public static final String ECF2014_SPEED_VALUE = "ecf2014.speedValue";
// public static final String ECF2014_RPM_VALUE = "ecf2014.rpmValue";
// pub... | import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.inject.Named;
import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.LightweightSystem;
import org.eclipse.draw2d.PositionCon... | package com.opcoach.ecf2014.engine.ui.parts;
public class DashBoard
{
private GaugeFigure speedCounter;
private GaugeFigure rpmCounter;
private XYGraphMediaFactory gmfactory;
private static final int COUNTER_SIZE = 200;
private static final int COUNTER_MARGIN = 15;
private Canvas canvas;
@Inject
public ... | // Path: ECF14/ecf14_files/step5-SimulatorEngine/EngineSimulator.java
// public class EngineSimulator {
//
// // Define the constants to get/set values from context
// public static final String ECF2014_SPEED_VALUE = "ecf2014.speedValue";
// public static final String ECF2014_RPM_VALUE = "ecf2014.rpmValue";
// pub... | EngineSimulator simu = ContextInjectionFactory.make(EngineSimulator.class, appliContext); |
opcoach/Conferences | ECF14/com.opcoach.ecf2014.engine.ui/src/com/opcoach/ecf2014/engine/ui/parts/DashBoard.java | // Path: ECF14/ecf14_files/step5-SimulatorEngine/EngineSimulator.java
// public class EngineSimulator {
//
// // Define the constants to get/set values from context
// public static final String ECF2014_SPEED_VALUE = "ecf2014.speedValue";
// public static final String ECF2014_RPM_VALUE = "ecf2014.rpmValue";
// pub... | import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.inject.Named;
import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.LightweightSystem;
import org.eclipse.draw2d.PositionCon... | package com.opcoach.ecf2014.engine.ui.parts;
public class DashBoard
{
private GaugeFigure speedCounter;
private GaugeFigure rpmCounter;
private XYGraphMediaFactory gmfactory;
private static final int COUNTER_SIZE = 200;
private static final int COUNTER_MARGIN = 15;
private Canvas canvas;
@Inject
public ... | // Path: ECF14/ecf14_files/step5-SimulatorEngine/EngineSimulator.java
// public class EngineSimulator {
//
// // Define the constants to get/set values from context
// public static final String ECF2014_SPEED_VALUE = "ecf2014.speedValue";
// public static final String ECF2014_RPM_VALUE = "ecf2014.rpmValue";
// pub... | EngineWatcher watcher = ContextInjectionFactory.make(EngineWatcher.class, appliContext); |
opcoach/Conferences | ECF14/ecf14_files/step8-EngineWatcher/DashBoard.java | // Path: ECF14/ecf14_files/step8-EngineWatcher/EngineWatcher.java
// public class EngineWatcher
// {
// // Define the sent topics
// public static final String ALARM_TOPIC = "Alarm/*";
// public static final String ALARM_RPM_TOO_HIGH = "Alarm/RpmTooHigh";
// public static final String ALARM_SPEED_TOO_HIGH = "Alarm/... | import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.inject.Named;
import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.GridLayout;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.LightweightSystem;
import org.eclipse.draw2d.PositionConstan... | package com.opcoach.ecf14.eap.parts;
public class DashBoard
{
private GaugeFigure speedCounter;
private GaugeFigure rpmCounter;
private XYGraphMediaFactory gmfactory;
private Canvas canvas;
@Inject
public DashBoard(MApplication appli)
{
// We will use the application context to store and inject values.
... | // Path: ECF14/ecf14_files/step8-EngineWatcher/EngineWatcher.java
// public class EngineWatcher
// {
// // Define the sent topics
// public static final String ALARM_TOPIC = "Alarm/*";
// public static final String ALARM_RPM_TOO_HIGH = "Alarm/RpmTooHigh";
// public static final String ALARM_SPEED_TOO_HIGH = "Alarm/... | EngineSimulator simu = ContextInjectionFactory.make(EngineSimulator.class, appliContext); |
opcoach/Conferences | ECF14/ecf14_files/step8-EngineWatcher/DashBoard.java | // Path: ECF14/ecf14_files/step8-EngineWatcher/EngineWatcher.java
// public class EngineWatcher
// {
// // Define the sent topics
// public static final String ALARM_TOPIC = "Alarm/*";
// public static final String ALARM_RPM_TOO_HIGH = "Alarm/RpmTooHigh";
// public static final String ALARM_SPEED_TOO_HIGH = "Alarm/... | import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.inject.Named;
import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.GridLayout;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.LightweightSystem;
import org.eclipse.draw2d.PositionConstan... | package com.opcoach.ecf14.eap.parts;
public class DashBoard
{
private GaugeFigure speedCounter;
private GaugeFigure rpmCounter;
private XYGraphMediaFactory gmfactory;
private Canvas canvas;
@Inject
public DashBoard(MApplication appli)
{
// We will use the application context to store and inject values.
... | // Path: ECF14/ecf14_files/step8-EngineWatcher/EngineWatcher.java
// public class EngineWatcher
// {
// // Define the sent topics
// public static final String ALARM_TOPIC = "Alarm/*";
// public static final String ALARM_RPM_TOO_HIGH = "Alarm/RpmTooHigh";
// public static final String ALARM_SPEED_TOO_HIGH = "Alarm/... | EngineWatcher watcher = ContextInjectionFactory.make(EngineWatcher.class, appliContext); |
opcoach/Conferences | ECF14/ecf14_files/step6-EngineControlPanel/EngineControlPart.java | // Path: ECF14/ecf14_files/step5-SimulatorEngine/EngineSimulator.java
// public class EngineSimulator {
//
// // Define the constants to get/set values from context
// public static final String ECF2014_SPEED_VALUE = "ecf2014.speedValue";
// public static final String ECF2014_RPM_VALUE = "ecf2014.rpmValue";
// pub... | import javax.annotation.PostConstruct;
import javax.inject.Inject;
import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.LightweightSystem;
import org.eclipse.e4.core.di.annotations.Optional;
import org.eclipse.nebula.visualization.widgets.datadefinition.IManualValueChangeListener;
import org.eclipse.nebu... | package com.opcoach.ecf2014.engine.ui.parts;
public class EngineControlPart
{
@Inject
@Optional | // Path: ECF14/ecf14_files/step5-SimulatorEngine/EngineSimulator.java
// public class EngineSimulator {
//
// // Define the constants to get/set values from context
// public static final String ECF2014_SPEED_VALUE = "ecf2014.speedValue";
// public static final String ECF2014_RPM_VALUE = "ecf2014.rpmValue";
// pub... | EngineSimulator engineSimu; |
opcoach/Conferences | ECF14/com.opcoach.ecf2014.engine.core/src/com/opcoach/ecf2014/engine/core/EngineContextFunction.java | // Path: ECF14/com.opcoach.ecf2014.engine.core/src/com/opcoach/ecf2014/engine/core/impl/DefaultEngineLogger.java
// public class DefaultEngineLogger implements IEngineLogger
// {
//
// private SimpleDateFormat sdf;
//
// @Inject
// public DefaultEngineLogger() {
// sdf = new SimpleDateFormat("HH:mm:ss");
// }... | import org.eclipse.e4.core.contexts.ContextFunction;
import org.eclipse.e4.core.contexts.ContextInjectionFactory;
import org.eclipse.e4.core.contexts.IEclipseContext;
import org.eclipse.e4.ui.model.application.MApplication;
import com.opcoach.ecf2014.engine.core.impl.DefaultEngineLogger; | package com.opcoach.ecf2014.engine.core;
public class EngineContextFunction extends ContextFunction
{
@Override
public Object compute(IEclipseContext context, String contextKey)
{
System.out.println("---> Enter in EngineContextFunction"); | // Path: ECF14/com.opcoach.ecf2014.engine.core/src/com/opcoach/ecf2014/engine/core/impl/DefaultEngineLogger.java
// public class DefaultEngineLogger implements IEngineLogger
// {
//
// private SimpleDateFormat sdf;
//
// @Inject
// public DefaultEngineLogger() {
// sdf = new SimpleDateFormat("HH:mm:ss");
// }... | IEngineLogger result = ContextInjectionFactory.make(DefaultEngineLogger.class, context); |
opcoach/Conferences | ECF14/ecf14_files/step5-SimulatorEngine/DashBoard.java | // Path: ECF14/ecf14_files/step5-SimulatorEngine/EngineSimulator.java
// public class EngineSimulator {
//
// // Define the constants to get/set values from context
// public static final String ECF2014_SPEED_VALUE = "ecf2014.speedValue";
// public static final String ECF2014_RPM_VALUE = "ecf2014.rpmValue";
// pub... | import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.inject.Named;
import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.GridLayout;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.LightweightSystem;
import org.eclipse.draw2d.PositionConstan... | package com.opcoach.ecf14.eap.parts;
public class DashBoard
{
private GaugeFigure speedCounter;
private GaugeFigure rpmCounter;
private XYGraphMediaFactory gmfactory;
private Canvas canvas;
@Inject
public DashBoard(MApplication appli)
{
// Step 5 : create and start Engine. | // Path: ECF14/ecf14_files/step5-SimulatorEngine/EngineSimulator.java
// public class EngineSimulator {
//
// // Define the constants to get/set values from context
// public static final String ECF2014_SPEED_VALUE = "ecf2014.speedValue";
// public static final String ECF2014_RPM_VALUE = "ecf2014.rpmValue";
// pub... | EngineSimulator simu = ContextInjectionFactory.make(EngineSimulator.class, appli.getContext()); |
opcoach/Conferences | ECF14/com.opcoach.ecf2014.engine.ui/src/com/opcoach/ecf2014/engine/ui/parts/EngineControlPart.java | // Path: ECF14/ecf14_files/step5-SimulatorEngine/EngineSimulator.java
// public class EngineSimulator {
//
// // Define the constants to get/set values from context
// public static final String ECF2014_SPEED_VALUE = "ecf2014.speedValue";
// public static final String ECF2014_RPM_VALUE = "ecf2014.rpmValue";
// pub... | import javax.annotation.PostConstruct;
import javax.inject.Inject;
import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.LightweightSystem;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.nebula.visualization.widgets.datadefinition.IMa... | package com.opcoach.ecf2014.engine.ui.parts;
public class EngineControlPart
{
private static final String IMG_START = "icons/startButton.png";
private static final String IMG_STOP = "icons/stopButton.png";
// private static final String IMG_FUNCTION = "icons/functionButton.png";
@Inject | // Path: ECF14/ecf14_files/step5-SimulatorEngine/EngineSimulator.java
// public class EngineSimulator {
//
// // Define the constants to get/set values from context
// public static final String ECF2014_SPEED_VALUE = "ecf2014.speedValue";
// public static final String ECF2014_RPM_VALUE = "ecf2014.rpmValue";
// pub... | private EngineSimulator engineSimu; |
advantageous/ddp-client-java | ddp-client/src/main/java/io/advantageous/ddp/subscription/message/NoSubscriptionMessage.java | // Path: ddp-client/src/main/java/io/advantageous/ddp/DDPError.java
// public class DDPError {
//
// private final int error;
//
// private final String reason;
//
// private final String details;
//
// public DDPError(final int error, final String reason, final String details) {
// this.err... | import io.advantageous.ddp.DDPError; | /*
* Copyright (C) 2014. Geoffrey Chandler.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | // Path: ddp-client/src/main/java/io/advantageous/ddp/DDPError.java
// public class DDPError {
//
// private final int error;
//
// private final String reason;
//
// private final String details;
//
// public DDPError(final int error, final String reason, final String details) {
// this.err... | private DDPError error; |
advantageous/ddp-client-java | ddp-client/src/main/java/io/advantageous/ddp/repository/MeteorCollectionRepository.java | // Path: ddp-client/src/main/java/io/advantageous/ddp/rpc/RPCClient.java
// public interface RPCClient {
//
// void call(String methodName,
// Object[] params,
// SuccessHandler<Object> successHandler,
// FailureHandler failureHandler) throws IOException;
//
// interf... | import io.advantageous.ddp.rpc.RPCClient;
import java.io.IOException;
import java.util.Map; | /*
* Copyright (C) 2014. Geoffrey Chandler.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | // Path: ddp-client/src/main/java/io/advantageous/ddp/rpc/RPCClient.java
// public interface RPCClient {
//
// void call(String methodName,
// Object[] params,
// SuccessHandler<Object> successHandler,
// FailureHandler failureHandler) throws IOException;
//
// interf... | RPCClient.SuccessHandler<Object> onSuccess, |
advantageous/ddp-client-java | ddp-client/src/main/java/io/advantageous/ddp/rpc/RPCClient.java | // Path: ddp-client/src/main/java/io/advantageous/ddp/DDPError.java
// public class DDPError {
//
// private final int error;
//
// private final String reason;
//
// private final String details;
//
// public DDPError(final int error, final String reason, final String details) {
// this.err... | import io.advantageous.ddp.DDPError;
import java.io.IOException; | /*
* Copyright (C) 2014. Geoffrey Chandler.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | // Path: ddp-client/src/main/java/io/advantageous/ddp/DDPError.java
// public class DDPError {
//
// private final int error;
//
// private final String reason;
//
// private final String details;
//
// public DDPError(final int error, final String reason, final String details) {
// this.err... | void onFailure(DDPError message); |
advantageous/ddp-client-java | ddp-client/src/main/java/io/advantageous/ddp/MessageConverter.java | // Path: ddp-client/src/main/java/io/advantageous/ddp/rpc/MethodMessage.java
// public class MethodMessage {
//
// private String method;
//
// private String id;
//
// private Object[] params;
//
// public String getMethod() {
// return method;
// }
//
// public void setMethod(Stri... | import io.advantageous.ddp.rpc.MethodMessage;
import io.advantageous.ddp.rpc.ResultMessage;
import io.advantageous.ddp.rpc.UpdatedMessage;
import io.advantageous.ddp.subscription.message.*;
import java.util.HashMap;
import java.util.Map; | /*
* Copyright (C) 2014. Geoffrey Chandler.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | // Path: ddp-client/src/main/java/io/advantageous/ddp/rpc/MethodMessage.java
// public class MethodMessage {
//
// private String method;
//
// private String id;
//
// private Object[] params;
//
// public String getMethod() {
// return method;
// }
//
// public void setMethod(Stri... | register("method", MethodMessage.class); |
advantageous/ddp-client-java | ddp-client/src/main/java/io/advantageous/ddp/MessageConverter.java | // Path: ddp-client/src/main/java/io/advantageous/ddp/rpc/MethodMessage.java
// public class MethodMessage {
//
// private String method;
//
// private String id;
//
// private Object[] params;
//
// public String getMethod() {
// return method;
// }
//
// public void setMethod(Stri... | import io.advantageous.ddp.rpc.MethodMessage;
import io.advantageous.ddp.rpc.ResultMessage;
import io.advantageous.ddp.rpc.UpdatedMessage;
import io.advantageous.ddp.subscription.message.*;
import java.util.HashMap;
import java.util.Map; | /*
* Copyright (C) 2014. Geoffrey Chandler.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | // Path: ddp-client/src/main/java/io/advantageous/ddp/rpc/MethodMessage.java
// public class MethodMessage {
//
// private String method;
//
// private String id;
//
// private Object[] params;
//
// public String getMethod() {
// return method;
// }
//
// public void setMethod(Stri... | register("result", ResultMessage.class); |
advantageous/ddp-client-java | ddp-client/src/main/java/io/advantageous/ddp/MessageConverter.java | // Path: ddp-client/src/main/java/io/advantageous/ddp/rpc/MethodMessage.java
// public class MethodMessage {
//
// private String method;
//
// private String id;
//
// private Object[] params;
//
// public String getMethod() {
// return method;
// }
//
// public void setMethod(Stri... | import io.advantageous.ddp.rpc.MethodMessage;
import io.advantageous.ddp.rpc.ResultMessage;
import io.advantageous.ddp.rpc.UpdatedMessage;
import io.advantageous.ddp.subscription.message.*;
import java.util.HashMap;
import java.util.Map; | /*
* Copyright (C) 2014. Geoffrey Chandler.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | // Path: ddp-client/src/main/java/io/advantageous/ddp/rpc/MethodMessage.java
// public class MethodMessage {
//
// private String method;
//
// private String id;
//
// private Object[] params;
//
// public String getMethod() {
// return method;
// }
//
// public void setMethod(Stri... | register("updated", UpdatedMessage.class); |
advantageous/ddp-client-java | ddp-client/src/main/java/io/advantageous/ddp/subscription/BaseSubscriptionAdapter.java | // Path: ddp-client/src/main/java/io/advantageous/ddp/DDPMessageEndpoint.java
// public interface DDPMessageEndpoint {
// void disconnect() throws IOException;
//
// void connect(String address) throws IOException, InterruptedException;
//
// <T> void registerHandler(Class<T> messageType, DDPMessageHandle... | import io.advantageous.ddp.DDPMessageEndpoint;
import io.advantageous.ddp.subscription.message.NoSubscriptionMessage;
import io.advantageous.ddp.subscription.message.ReadyMessage;
import io.advantageous.ddp.subscription.message.SubscribeMessage;
import io.advantageous.ddp.subscription.message.UnsubscribeMessage;
import... | /*
* Copyright (C) 2014. Geoffrey Chandler.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | // Path: ddp-client/src/main/java/io/advantageous/ddp/DDPMessageEndpoint.java
// public interface DDPMessageEndpoint {
// void disconnect() throws IOException;
//
// void connect(String address) throws IOException, InterruptedException;
//
// <T> void registerHandler(Class<T> messageType, DDPMessageHandle... | protected final DDPMessageEndpoint messageEndpoint; |
advantageous/ddp-client-java | ddp-client/src/main/java/io/advantageous/ddp/subscription/BaseSubscriptionAdapter.java | // Path: ddp-client/src/main/java/io/advantageous/ddp/DDPMessageEndpoint.java
// public interface DDPMessageEndpoint {
// void disconnect() throws IOException;
//
// void connect(String address) throws IOException, InterruptedException;
//
// <T> void registerHandler(Class<T> messageType, DDPMessageHandle... | import io.advantageous.ddp.DDPMessageEndpoint;
import io.advantageous.ddp.subscription.message.NoSubscriptionMessage;
import io.advantageous.ddp.subscription.message.ReadyMessage;
import io.advantageous.ddp.subscription.message.SubscribeMessage;
import io.advantageous.ddp.subscription.message.UnsubscribeMessage;
import... | /*
* Copyright (C) 2014. Geoffrey Chandler.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | // Path: ddp-client/src/main/java/io/advantageous/ddp/DDPMessageEndpoint.java
// public interface DDPMessageEndpoint {
// void disconnect() throws IOException;
//
// void connect(String address) throws IOException, InterruptedException;
//
// <T> void registerHandler(Class<T> messageType, DDPMessageHandle... | messageEndpoint.registerHandler(ReadyMessage.class, message -> { |
advantageous/ddp-client-java | ddp-client/src/main/java/io/advantageous/ddp/subscription/BaseSubscriptionAdapter.java | // Path: ddp-client/src/main/java/io/advantageous/ddp/DDPMessageEndpoint.java
// public interface DDPMessageEndpoint {
// void disconnect() throws IOException;
//
// void connect(String address) throws IOException, InterruptedException;
//
// <T> void registerHandler(Class<T> messageType, DDPMessageHandle... | import io.advantageous.ddp.DDPMessageEndpoint;
import io.advantageous.ddp.subscription.message.NoSubscriptionMessage;
import io.advantageous.ddp.subscription.message.ReadyMessage;
import io.advantageous.ddp.subscription.message.SubscribeMessage;
import io.advantageous.ddp.subscription.message.UnsubscribeMessage;
import... | /*
* Copyright (C) 2014. Geoffrey Chandler.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | // Path: ddp-client/src/main/java/io/advantageous/ddp/DDPMessageEndpoint.java
// public interface DDPMessageEndpoint {
// void disconnect() throws IOException;
//
// void connect(String address) throws IOException, InterruptedException;
//
// <T> void registerHandler(Class<T> messageType, DDPMessageHandle... | messageEndpoint.registerHandler(NoSubscriptionMessage.class, message -> { |
advantageous/ddp-client-java | ddp-client/src/main/java/io/advantageous/ddp/subscription/BaseSubscriptionAdapter.java | // Path: ddp-client/src/main/java/io/advantageous/ddp/DDPMessageEndpoint.java
// public interface DDPMessageEndpoint {
// void disconnect() throws IOException;
//
// void connect(String address) throws IOException, InterruptedException;
//
// <T> void registerHandler(Class<T> messageType, DDPMessageHandle... | import io.advantageous.ddp.DDPMessageEndpoint;
import io.advantageous.ddp.subscription.message.NoSubscriptionMessage;
import io.advantageous.ddp.subscription.message.ReadyMessage;
import io.advantageous.ddp.subscription.message.SubscribeMessage;
import io.advantageous.ddp.subscription.message.UnsubscribeMessage;
import... | this.messageEndpoint = messageEndpoint;
messageEndpoint.registerHandler(ReadyMessage.class, message -> {
for (final String sub : message.getSubs()) {
final Subscription.Callback callback = this.callbackMap.get(sub);
if (callback != null) {
... | // Path: ddp-client/src/main/java/io/advantageous/ddp/DDPMessageEndpoint.java
// public interface DDPMessageEndpoint {
// void disconnect() throws IOException;
//
// void connect(String address) throws IOException, InterruptedException;
//
// <T> void registerHandler(Class<T> messageType, DDPMessageHandle... | final SubscribeMessage message = new SubscribeMessage(); |
advantageous/ddp-client-java | ddp-client/src/main/java/io/advantageous/ddp/subscription/BaseSubscriptionAdapter.java | // Path: ddp-client/src/main/java/io/advantageous/ddp/DDPMessageEndpoint.java
// public interface DDPMessageEndpoint {
// void disconnect() throws IOException;
//
// void connect(String address) throws IOException, InterruptedException;
//
// <T> void registerHandler(Class<T> messageType, DDPMessageHandle... | import io.advantageous.ddp.DDPMessageEndpoint;
import io.advantageous.ddp.subscription.message.NoSubscriptionMessage;
import io.advantageous.ddp.subscription.message.ReadyMessage;
import io.advantageous.ddp.subscription.message.SubscribeMessage;
import io.advantageous.ddp.subscription.message.UnsubscribeMessage;
import... | });
messageEndpoint.registerHandler(NoSubscriptionMessage.class, message -> {
final Subscription.Callback callback = this.callbackMap.get(message.getId());
if (callback != null) {
callback.onFailure(message.getId(), message.getError());
this.callba... | // Path: ddp-client/src/main/java/io/advantageous/ddp/DDPMessageEndpoint.java
// public interface DDPMessageEndpoint {
// void disconnect() throws IOException;
//
// void connect(String address) throws IOException, InterruptedException;
//
// <T> void registerHandler(Class<T> messageType, DDPMessageHandle... | final UnsubscribeMessage message = new UnsubscribeMessage(); |
advantageous/ddp-client-java | ddp-client/src/main/java/io/advantageous/ddp/rpc/ResultMessage.java | // Path: ddp-client/src/main/java/io/advantageous/ddp/DDPError.java
// public class DDPError {
//
// private final int error;
//
// private final String reason;
//
// private final String details;
//
// public DDPError(final int error, final String reason, final String details) {
// this.err... | import io.advantageous.ddp.DDPError; | /*
* Copyright (C) 2014. Geoffrey Chandler.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | // Path: ddp-client/src/main/java/io/advantageous/ddp/DDPError.java
// public class DDPError {
//
// private final int error;
//
// private final String reason;
//
// private final String details;
//
// public DDPError(final int error, final String reason, final String details) {
// this.err... | private DDPError error; |
advantageous/ddp-client-java | ddp-client/src/main/java/io/advantageous/ddp/subscription/Subscription.java | // Path: ddp-client/src/main/java/io/advantageous/ddp/DDPError.java
// public class DDPError {
//
// private final int error;
//
// private final String reason;
//
// private final String details;
//
// public DDPError(final int error, final String reason, final String details) {
// this.err... | import io.advantageous.ddp.DDPError; | this(subscriptionName, null, clazz, callback);
}
public Subscription(String subscriptionName, Object[] params, Callback callback) {
this(subscriptionName, params, Object.class, callback);
}
public String getSubscriptionName() {
return subscriptionName;
}
public Object[... | // Path: ddp-client/src/main/java/io/advantageous/ddp/DDPError.java
// public class DDPError {
//
// private final int error;
//
// private final String reason;
//
// private final String details;
//
// public DDPError(final int error, final String reason, final String details) {
// this.err... | void onFailure(String subscriptionId, DDPError error); |
advantageous/ddp-client-java | ddp-client/src/main/java/io/advantageous/ddp/rpc/RPCClientImpl.java | // Path: ddp-client/src/main/java/io/advantageous/ddp/DDPError.java
// public class DDPError {
//
// private final int error;
//
// private final String reason;
//
// private final String details;
//
// public DDPError(final int error, final String reason, final String details) {
// this.err... | import io.advantageous.ddp.DDPError;
import io.advantageous.ddp.DDPMessageEndpoint;
import javax.inject.Inject;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicLong; | /*
* Copyright (C) 2014. Geoffrey Chandler.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | // Path: ddp-client/src/main/java/io/advantageous/ddp/DDPError.java
// public class DDPError {
//
// private final int error;
//
// private final String reason;
//
// private final String details;
//
// public DDPError(final int error, final String reason, final String details) {
// this.err... | private final DDPMessageEndpoint client; |
advantageous/ddp-client-java | ddp-client/src/main/java/io/advantageous/ddp/rpc/RPCClientImpl.java | // Path: ddp-client/src/main/java/io/advantageous/ddp/DDPError.java
// public class DDPError {
//
// private final int error;
//
// private final String reason;
//
// private final String details;
//
// public DDPError(final int error, final String reason, final String details) {
// this.err... | import io.advantageous.ddp.DDPError;
import io.advantageous.ddp.DDPMessageEndpoint;
import javax.inject.Inject;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicLong; | /*
* Copyright (C) 2014. Geoffrey Chandler.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | // Path: ddp-client/src/main/java/io/advantageous/ddp/DDPError.java
// public class DDPError {
//
// private final int error;
//
// private final String reason;
//
// private final String details;
//
// public DDPError(final int error, final String reason, final String details) {
// this.err... | final DDPError error = result.getError(); |
advantageous/ddp-client-java | ddp-client/src/test/java/io/advantageous/ddp/subscription/MapSubscriptionAdapterTest.java | // Path: ddp-client/src/main/java/io/advantageous/ddp/subscription/message/AddedMessage.java
// public class AddedMessage {
//
// private String collection;
//
// private String id;
//
// private JsonObject fields;
//
// public String getCollection() {
// return collection;
// }
//
// ... | import static org.mockito.Matchers.any;
import static org.mockito.Mockito.*;
import io.advantageous.ddp.*;
import io.advantageous.ddp.subscription.message.AddedMessage;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.mockito.ArgumentCaptor;
import javax.websocket.*;
import java.io.IO... | /*
* Copyright (C) 2014. Geoffrey Chandler.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | // Path: ddp-client/src/main/java/io/advantageous/ddp/subscription/message/AddedMessage.java
// public class AddedMessage {
//
// private String collection;
//
// private String id;
//
// private JsonObject fields;
//
// public String getCollection() {
// return collection;
// }
//
// ... | client.registerHandler(AddedMessage.class, DDPMessageHandler.Phase.AFTER_UPDATE, message -> { |
advantageous/ddp-client-java | ddp-client/src/test/java/io/advantageous/ddp/JsonMessageConverterTest.java | // Path: ddp-client/src/main/java/io/advantageous/ddp/JsonMessageConverter.java
// public class JsonMessageConverter implements MessageConverter {
//
// private static final Gson GSON = new Gson();
//
// @Override
// public Object fromDDP(final String rawMessage) throws UnsupportedMessageException {
// ... | import io.advantageous.ddp.JsonMessageConverter;
import org.junit.Assert;
import org.junit.Test;
import java.util.Date; | /*
* Copyright (C) 2014. Geoffrey Chandler.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | // Path: ddp-client/src/main/java/io/advantageous/ddp/JsonMessageConverter.java
// public class JsonMessageConverter implements MessageConverter {
//
// private static final Gson GSON = new Gson();
//
// @Override
// public Object fromDDP(final String rawMessage) throws UnsupportedMessageException {
// ... | JsonMessageConverter converter = new JsonMessageConverter(); |
advantageous/ddp-client-java | ddp-client/src/main/java/io/advantageous/ddp/subscription/MapSubscriptionAdapter.java | // Path: ddp-client/src/main/java/io/advantageous/ddp/DDPMessageEndpoint.java
// public interface DDPMessageEndpoint {
// void disconnect() throws IOException;
//
// void connect(String address) throws IOException, InterruptedException;
//
// <T> void registerHandler(Class<T> messageType, DDPMessageHandle... | import io.advantageous.ddp.DDPMessageEndpoint;
import io.advantageous.ddp.subscription.message.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.inject.Inject;
import javax.inject.Named;
import java.util.HashMap;
import java.util.Map; | /*
* Copyright (C) 2014. Geoffrey Chandler.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | // Path: ddp-client/src/main/java/io/advantageous/ddp/DDPMessageEndpoint.java
// public interface DDPMessageEndpoint {
// void disconnect() throws IOException;
//
// void connect(String address) throws IOException, InterruptedException;
//
// <T> void registerHandler(Class<T> messageType, DDPMessageHandle... | public MapSubscriptionAdapter(final DDPMessageEndpoint endpoint, |
advantageous/ddp-client-java | examples/java-fx/src/main/java/io/advantageous/ddp/example/MainViewController.java | // Path: ddp-client/src/main/java/io/advantageous/ddp/repository/MeteorCollectionRepository.java
// public interface MeteorCollectionRepository {
// void delete(String collectionName,
// String docId) throws IOException;
//
// void delete(String collectionName,
// String docId,
... | import java.net.URL;
import java.util.HashMap;
import java.util.Map;
import java.util.ResourceBundle;
import com.google.common.eventbus.EventBus;
import com.google.common.eventbus.Subscribe;
import io.advantageous.ddp.repository.MeteorCollectionRepository;
import javafx.application.Platform;
import javafx.fxml.FXML;
im... | /*
* Copyright (C) 2014. Geoffrey Chandler.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | // Path: ddp-client/src/main/java/io/advantageous/ddp/repository/MeteorCollectionRepository.java
// public interface MeteorCollectionRepository {
// void delete(String collectionName,
// String docId) throws IOException;
//
// void delete(String collectionName,
// String docId,
... | private MeteorCollectionRepository meteorCollectionRepository; |
advantageous/ddp-client-java | examples/java-fx/src/main/java/io/advantageous/ddp/example/SampleApplication.java | // Path: ddp-client/src/main/java/io/advantageous/ddp/ConnectedMessage.java
// public class ConnectedMessage {
//
// private String session;
//
// public String getSession() {
// return session;
// }
//
// public void setSession(String session) {
// this.session = session;
// }
//... | import javax.inject.Inject;
import java.io.IOException;
import com.google.inject.Guice;
import io.advantageous.ddp.ConnectedMessage;
import io.advantageous.ddp.DDPMessageEndpoint;
import io.advantageous.ddp.ErrorMessage;
import io.advantageous.ddp.subscription.Subscription;
import io.advantageous.ddp.subscription.Subsc... | /*
* Copyright (C) 2014. Geoffrey Chandler.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | // Path: ddp-client/src/main/java/io/advantageous/ddp/ConnectedMessage.java
// public class ConnectedMessage {
//
// private String session;
//
// public String getSession() {
// return session;
// }
//
// public void setSession(String session) {
// this.session = session;
// }
//... | private DDPMessageEndpoint endpoint; |
advantageous/ddp-client-java | examples/java-fx/src/main/java/io/advantageous/ddp/example/SampleApplication.java | // Path: ddp-client/src/main/java/io/advantageous/ddp/ConnectedMessage.java
// public class ConnectedMessage {
//
// private String session;
//
// public String getSession() {
// return session;
// }
//
// public void setSession(String session) {
// this.session = session;
// }
//... | import javax.inject.Inject;
import java.io.IOException;
import com.google.inject.Guice;
import io.advantageous.ddp.ConnectedMessage;
import io.advantageous.ddp.DDPMessageEndpoint;
import io.advantageous.ddp.ErrorMessage;
import io.advantageous.ddp.subscription.Subscription;
import io.advantageous.ddp.subscription.Subsc... | /*
* Copyright (C) 2014. Geoffrey Chandler.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or ag... | // Path: ddp-client/src/main/java/io/advantageous/ddp/ConnectedMessage.java
// public class ConnectedMessage {
//
// private String session;
//
// public String getSession() {
// return session;
// }
//
// public void setSession(String session) {
// this.session = session;
// }
//... | private SubscriptionAdapter adapter; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.