Skip to content

Commit

Permalink
Merge pull request #2391 from subutai-io/dev
Browse files Browse the repository at this point in the history
#2379 (Dev -> Master)
  • Loading branch information
Dilshat authored Apr 10, 2018
2 parents f2c4341 + 7580af5 commit 6757d63
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public void pushEvent( final Event event )
{
LOG.debug( "Event received: {} {}", event, JsonUtil.toJson( event ) );
LOG.debug( "OS: {}", event.getCustomMetaByKey( "OS" ) );
LOG.debug( "Nature: {}", event.getPayload().getNature() );
}
catch ( JsonProcessingException e )
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import io.subutai.hub.share.event.meta.CustomMeta;
import io.subutai.hub.share.event.meta.OriginMeta;
import io.subutai.hub.share.event.meta.SourceMeta;
import io.subutai.hub.share.event.payload.Payload;


Expand All @@ -18,6 +19,8 @@ public interface Event

OriginMeta getOrigin();

SourceMeta getSource();

void addCustomMeta( CustomMeta customMeta );

List<CustomMeta> getCustomMetaByKey( String key );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ public OriginMeta getOrigin()
}


@Override
public SourceMeta getSource()
{
return this.metaData.getSource();
}


@Override
public Payload getPayload()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@


import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonProperty;


@JsonAutoDetect( fieldVisibility = JsonAutoDetect.Visibility.ANY, getterVisibility = JsonAutoDetect.Visibility.NONE,
Expand All @@ -15,6 +16,7 @@ public enum Type


private String name;
@JsonProperty( value = "value" )
private Type type;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public CustomPayload( final String message )


@Override
Nature getNature()
public Nature getNature()
{
return Nature.CUSTOM;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public LogPayload( final String source, final String message, final Level level


@Override
Nature getNature()
public Nature getNature()
{
return Nature.LOG;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ public enum Nature
}


abstract Nature getNature();
public abstract Nature getNature();
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private ProgressPayload()


@Override
Nature getNature()
public Nature getNature()
{
return Nature.PROGRESS;
}
Expand Down

0 comments on commit 6757d63

Please sign in to comment.