public abstract class MessageInput extends Object implements Stoppable
| Modifier and Type | Class and Description |
|---|---|
static class |
MessageInput.Config |
static class |
MessageInput.Descriptor |
static interface |
MessageInput.Factory<M> |
| Modifier and Type | Field and Description |
|---|---|
protected Configuration |
configuration |
protected String |
contentPack |
protected org.joda.time.DateTime |
createdAt |
protected String |
creatorUserId |
protected IOState.Type |
desiredState |
static String |
FIELD_ATTRIBUTES |
static String |
FIELD_CONFIGURATION |
static String |
FIELD_CONTENT_PACK |
static String |
FIELD_CREATED_AT |
static String |
FIELD_CREATOR_USER_ID |
static String |
FIELD_DESIRED_STATE |
static String |
FIELD_GLOBAL |
static String |
FIELD_ID |
static String |
FIELD_NAME |
static String |
FIELD_NODE_ID |
static String |
FIELD_STARTED_AT |
static String |
FIELD_STATIC_FIELDS |
static String |
FIELD_TITLE |
static String |
FIELD_TYPE |
protected Boolean |
global |
protected InputBuffer |
inputBuffer |
protected String |
persistId |
protected String |
title |
| Constructor and Description |
|---|
MessageInput(com.codahale.metrics.MetricRegistry metricRegistry,
Configuration configuration,
Transport transport,
LocalMetricRegistry localRegistry,
Codec codec,
MessageInput.Config config,
MessageInput.Descriptor descriptor,
ServerStatus serverStatus) |
public static final String FIELD_ID
public static final String FIELD_TYPE
public static final String FIELD_NODE_ID
public static final String FIELD_NAME
public static final String FIELD_TITLE
public static final String FIELD_CONFIGURATION
public static final String FIELD_CREATOR_USER_ID
public static final String FIELD_CREATED_AT
public static final String FIELD_STARTED_AT
public static final String FIELD_ATTRIBUTES
public static final String FIELD_STATIC_FIELDS
public static final String FIELD_GLOBAL
public static final String FIELD_DESIRED_STATE
public static final String FIELD_CONTENT_PACK
protected String title
protected String creatorUserId
protected String persistId
protected org.joda.time.DateTime createdAt
protected Boolean global
protected IOState.Type desiredState
protected String contentPack
protected final Configuration configuration
protected InputBuffer inputBuffer
public MessageInput(com.codahale.metrics.MetricRegistry metricRegistry,
Configuration configuration,
Transport transport,
LocalMetricRegistry localRegistry,
Codec codec,
MessageInput.Config config,
MessageInput.Descriptor descriptor,
ServerStatus serverStatus)
public static int getDefaultRecvBufferSize()
public static void setDefaultRecvBufferSize(int size)
public void initialize()
public void checkConfiguration()
throws ConfigurationException
ConfigurationExceptionpublic void launch(InputBuffer buffer) throws MisfireException
MisfireExceptionpublic void terminate()
public ConfigurationRequest getRequestedConfiguration()
public MessageInput.Descriptor getDescriptor()
public String getName()
public boolean isExclusive()
public String getId()
public String getPersistId()
public void setPersistId(String id)
public String getTitle()
public void setTitle(String title)
public String getCreatorUserId()
public void setCreatorUserId(String creatorUserId)
public org.joda.time.DateTime getCreatedAt()
public void setCreatedAt(org.joda.time.DateTime createdAt)
public Configuration getConfiguration()
public Boolean isGlobal()
public boolean onlyOnePerCluster()
This might be useful for an input which polls data from an external source and maintains local state, i.e. a cursor, to determine records have been fetched already. In that case, running a second instance of the input at the same time on a different node in the cluster might then lead to the same data fetched again, which would produce duplicate log messages in Graylog.
Returning true from this method will only really make sense if the input also isGlobal.
true if only a single instance of the input should be launched in the cluster. It will be
launched on the leader node.
false otherwise
public void setGlobal(Boolean global)
public IOState.Type getDesiredState()
public void setDesiredState(IOState.Type newDesiredState)
public String getContentPack()
public void setContentPack(String contentPack)
@Deprecated public Map<String,Object> getAttributesWithMaskedPasswords()
public String getUniqueReadableId()
public Codec getCodec()
public void processRawMessage(RawMessage rawMessage)
public String getType()
public String getNodeId()
public void setNodeId(String nodeId)
Copyright © 2012–2022 Graylog, Inc.. All rights reserved.