com.thomsonreuters.ema.access.OmmTimeImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ema Show documentation
Show all versions of ema Show documentation
Enterprise Message API (EMA) Java Edition
///*|-----------------------------------------------------------------------------
// *| This source code is provided under the Apache 2.0 license --
// *| and is provided AS IS with no warranty or guarantee of fit for purpose. --
// *| See the project's LICENSE.md for details. --
// *| Copyright (C) 2019 Refinitiv. All rights reserved. --
///*|-----------------------------------------------------------------------------
package com.thomsonreuters.ema.access;
class OmmTimeImpl extends DataImpl implements OmmTime
{
com.thomsonreuters.upa.codec.Time _rsslTime = com.thomsonreuters.upa.codec.CodecFactory.createTime();
@Override
public int dataType()
{
return DataType.DataTypes.TIME;
}
@Override
public int hour()
{
return _rsslTime.hour();
}
@Override
public int minute()
{
return _rsslTime.minute();
}
@Override
public int second()
{
return _rsslTime.second();
}
@Override
public int millisecond()
{
return _rsslTime.millisecond();
}
@Override
public int microsecond()
{
return _rsslTime.microsecond();
}
@Override
public int nanosecond()
{
return _rsslTime.nanosecond();
}
@Override
public String toString()
{
if (DataCode.BLANK == code())
return BLANK_STRING;
else
return _rsslTime.toString();
}
@Override
void decode(com.thomsonreuters.upa.codec.Buffer rsslBuffer, com.thomsonreuters.upa.codec.DecodeIterator dIter)
{
_rsslBuffer = rsslBuffer;
if (com.thomsonreuters.upa.codec.CodecReturnCodes.SUCCESS == _rsslTime.decode(dIter))
_dataCode = DataCode.NO_CODE;
else
{
_dataCode = DataCode.BLANK;
_rsslTime.blank();
}
}
}