|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.neeve.util.UtlListElement
com.neeve.sma.MessageViewImpl
com.neeve.rog.impl.RogNode
com.neeve.server.mon.cnc.SrvMonInvokeCommandRequest
@Generated(value="com.neeve.adm.AdmXbufGenerator", date="Wed Mar 28 10:54:31 EDT 2018") @AdmGenerated(encoding="Xbuf", compatLevel="3.8.0", admVersion="nvx-adm v3.7.265 (build 0)", date="3/28/18 10:54 AM", buildInfo="nvx-talon-3.7.265 (nvx-codegen-plugin)") @AdmFactoryInfo(factoryClass=SrvMonCncFactory.class, vfid=36, ofid=36, typeId=10) public final class SrvMonInvokeCommandRequest
Instructs the server to inoke a command.
Nested Class Summary | |
---|---|
static class |
SrvMonInvokeCommandRequest.PacketBody
The backing packet type for SrvMonInvokeCommandRequest (used internally for serialization purposes). |
Nested classes/interfaces inherited from interface com.neeve.rog.IRogNode |
---|
IRogNode.PoolingListener |
Nested classes/interfaces inherited from interface com.neeve.ods.IStoreObject |
---|
IStoreObject.EncodingType |
Field Summary | |
---|---|
static SrvMonInvokeCommandRequest[] |
EMPTY_ARRAY
A preallocated empty array used to avoid garbage when returning empty arrays of this type. |
Fields inherited from class com.neeve.rog.impl.RogNode |
---|
DATE_FORMAT |
Fields inherited from class com.neeve.util.UtlListElement |
---|
count, head, next, prev |
Method Summary | ||
---|---|---|
void |
addParameters(String val)
Adds the provided value to the list of 'parameters' values. |
|
boolean |
appendFieldValueTo(Object node,
String[] pathComponents,
XString target)
Appends a reflected field value as a string into the given XString. |
|
boolean |
appendFieldValueTo(Object message,
String name,
XString target)
Appends a reflected field value as a string into the given XString. |
|
void |
clearCommandName()
Clears the value of 'commandName' Field Description The name of the command to invoke |
|
void |
clearContent()
|
|
void |
clearParameters()
Clears the value of 'parameters' Field Description The list of options and arguments for the command For example when invoking MyApp doSend --rate 20 --count 1000 true the parameters would look like: --rate 20 --count 1000 true |
|
void |
clearTarget()
Clears the value of 'target' Field Description The target (e.g. app) on which to invoke the command |
|
void |
clearXRogType()
|
|
SrvMonInvokeCommandRequest |
copy()
Creates a copy of this SrvMonInvokeCommandRequest. |
|
void |
copyInto(SrvMonInvokeCommandRequest copy)
Copies the contents of this SrvMonInvokeCommandRequest into the target. |
|
static SrvMonInvokeCommandRequest |
create()
|
|
static SrvMonInvokeCommandRequest |
create(com.eaio.uuid.UUID id)
|
|
static SrvMonInvokeCommandRequest |
createFrom(byte[] serializedContainer)
|
|
static SrvMonInvokeCommandRequest |
createFrom(ByteBuffer serializedContainer)
|
|
static SrvMonInvokeCommandRequest |
createFromJson(String json)
|
|
static SrvMonInvokeCommandRequest |
createFromRawJson(String json)
|
|
static SrvMonInvokeCommandRequest |
createFromSerializedXbufContainer(byte[] serializedContainer)
|
|
static SrvMonInvokeCommandRequest |
createFromSerializedXbufContainer(ByteBuffer serializedContainer)
|
|
static SrvMonInvokeCommandRequest |
createFromSerializedXbufContainerPacket(byte[] serializedPacket)
|
|
static SrvMonInvokeCommandRequest |
createFromSerializedXbufContainerPacket(ByteBuffer serializedPacket)
|
|
static SrvMonInvokeCommandRequest |
createFromXbufContainerPacket(PktPacket packet)
|
|
static com.neeve.xbuf.XbufRepeatedStringFieldBuffer |
createParametersFieldBuffer(int initialBufferLength,
boolean isNative)
Returns a wrapped buffer that can be used for doing an efficient bulk copy from an XIterator returned for this field. |
|
static com.neeve.xbuf.XbufSchema |
createSchema()
|
|
SrvMonInvokeCommandRequest |
deserialize(PktPacket packet)
Deserialize an object's data. |
|
SrvMonInvokeCommandRequest |
deserializeFromByteArray(byte[] array)
Deserialize a view's backing message from a byte array. |
|
SrvMonInvokeCommandRequest |
deserializeFromByteBuffer(ByteBuffer buffer)
Deserialize a view's backing message from a byte buffer. |
|
SrvMonInvokeCommandRequest |
deserializeFromJson(String json)
Deserialize a view's backing message from a json string |
|
SrvMonInvokeCommandRequest |
deserializeFromPacket(PktPacket packet)
Deserialize a view's backing message from a packet. |
|
SrvMonInvokeCommandRequest |
deserializeFromProtobuf(com.google.protobuf.Message message)
Deserialize a node's data from a protobuf message. |
|
SrvMonInvokeCommandRequest |
deserializeFromRawJson(String json)
|
|
int |
desync(PktBuffer buffer,
int pos,
boolean frameOnly)
|
|
void |
desyncFieldBitmask()
|
|
int |
dispose()
Default implementation of MessageView.dispose()
This is the default implementation of the dispose method. |
|
boolean |
fieldExists(Object message,
String name)
Check if a field of the supplied name exists in a message. |
|
PktBuffer |
getBackingBuffer()
|
|
String |
getCommandName()
Gets the value of 'commandName' Field Description The name of the command to invoke |
|
com.neeve.xbuf.XbufStringField |
getCommandNameField()
|
|
static int |
getCommandNameFieldId()
Get the field id for 'commandName' This method can be used to set field interests. |
|
|
getCommandNameTo(XString.Factory<T> factory)
Copies the value of this String field into a new XString from the given factory. |
|
void |
getCommandNameTo(XString val)
Copies the value of 'commandName' into the provided XString. |
|
XString |
getCommandNameUnsafe()
Gets the raw value of 'commandName'. |
|
IStoreObject.EncodingType |
getContentEncodingType()
Get an object's content data encoding type. |
|
static com.neeve.xbuf.XbufDesyncPolicy |
getDesyncPolicy()
|
|
XString |
getFieldValueAsRawString(Object message,
String name)
Get the value of a reflectable field in a message as a string. |
|
XString |
getFieldValueAsRawString(Object message,
String[] pathComponents)
Get the value of a reflectable field in a message as a string. |
|
String |
getFieldValueAsString(Object message,
String name)
Get the value of a reflectable field in a message as a string. |
|
String |
getFieldValueAsString(Object message,
String[] pathComponents)
Get the value of a reflectable field in a message as a string. |
|
PktPacket |
getPacket()
|
|
String[] |
getParameters()
Gets the value of 'parameters' If the field is not set this method will return null . |
|
String[] |
getParametersEmptyIfNull()
Gets the value of 'parameters' or an empty array if the value is null or not set. |
|
static int |
getParametersFieldId()
Get the field id for 'parameters' This method can be used to set field interests. |
|
XStringIterator |
getParametersIterator()
Gets the value of 'parameters' as iterator of values. |
|
String |
getTarget()
Gets the value of 'target' Field Description The target (e.g. app) on which to invoke the command |
|
com.neeve.xbuf.XbufStringField |
getTargetField()
|
|
static int |
getTargetFieldId()
Get the field id for 'target' This method can be used to set field interests. |
|
|
getTargetTo(XString.Factory<T> factory)
Copies the value of this String field into a new XString from the given factory. |
|
void |
getTargetTo(XString val)
Copies the value of 'target' into the provided XString. |
|
XString |
getTargetUnsafe()
Gets the raw value of 'target'. |
|
short |
getXRogType()
|
|
com.neeve.xbuf.XbufVariableShortField |
getXRogTypeField()
|
|
static int |
getXRogTypeFieldId()
Get the field id for 'xRogType' This method can be used to set field interests. |
|
boolean |
hasCommandName()
Checks for the presence of 'commandName' Field Description The name of the command to invoke |
|
boolean |
hasTarget()
Checks for the presence of 'target' Field Description The target (e.g. app) on which to invoke the command |
|
boolean |
hasXRogType()
|
|
boolean |
isDirty()
|
|
boolean |
isFieldReflectable(Object message,
String name)
Check if a field of the supplied name is reflectable. |
|
void |
lendCommandName(XString val)
Sets the value of 'commandName' Field Description The name of the command to invoke |
|
void |
lendTarget(XString val)
Sets the value of 'target' Field Description The target (e.g. app) on which to invoke the command |
|
boolean |
needsSync()
Check if a view needs to be sync'd for reflection. |
|
static void |
optimizeFor(int val)
|
|
PktPacket |
serialize()
Serialize an object's data. |
|
byte[] |
serializeToByteArray()
Serialize a view's backing message to a byte array. |
|
ByteBuffer |
serializeToByteBuffer()
Serialize a view's backing message to a byte buffer. |
|
com.neeve.io.IOBuffer |
serializeToIOBuffer(boolean useNative)
Serializes the MessageView to an IOBuffer. |
|
String |
serializeToJson()
Serialize a view's backing message to JSON. |
|
PktPacket |
serializeToPacket()
Serialize a view's backing message to a packet. |
|
com.google.protobuf.Message |
serializeToProtobuf()
Serialize a node's data to a proto message. |
|
String |
serializeToRawJson()
|
|
void |
setAsReadOnly()
Set whether a node is read only Note: This read-only flag only applies to data, not metadata |
|
void |
setCommandName(String val)
Sets the value of 'commandName' Field Description The name of the command to invoke |
|
void |
setCommandNameFrom(long val)
Sets the value of this String field to the given numeric value. |
|
void |
setCommandNameFrom(com.neeve.xbuf.XbufStringField val)
|
|
void |
setCommandNameFrom(XString val)
Copies the provided XString value into this object's 'commandName'. |
|
static void |
setDesyncPolicy(com.neeve.xbuf.XbufDesyncPolicy val)
|
|
static void |
setFieldInterest(List<Integer> fieldIds)
|
|
IStoreObject |
setFieldValue(int id,
Object val)
Set the value of an object field. |
|
void |
setParameters(String[] val)
Sets the value of 'parameters' Field Description The list of options and arguments for the command For example when invoking MyApp doSend --rate 20 --count 1000 true the parameters would look like: --rate 20 --count 1000 true |
|
void |
setParametersFrom(XIterator<String> val)
Sets the value of 'parameters' using the values from the provided iterator. |
|
void |
setTarget(String val)
Sets the value of 'target' Field Description The target (e.g. app) on which to invoke the command |
|
void |
setTargetFrom(long val)
Sets the value of this String field to the given numeric value. |
|
void |
setTargetFrom(com.neeve.xbuf.XbufStringField val)
|
|
void |
setTargetFrom(XString val)
Copies the provided XString value into this object's 'target'. |
|
void |
setXRogType(short val)
|
|
void |
setXRogTypeFrom(com.neeve.xbuf.XbufVariableShortField val)
|
|
void |
sync()
Ensure a view's backing message is prepared and ready for transport |
|
void |
syncFieldBitmask()
|
|
String |
toJsonString()
Get a JSON representation of an ROG entity |
|
String |
toJsonString(boolean includeMetadata,
String metadataObjectName,
String payloadObjectName)
Get a full JSON representation of an ROG entity |
|
String |
toString()
Return a string representation of this object |
|
void |
undispose(com.eaio.uuid.UUID id)
|
Methods inherited from class com.neeve.rog.impl.RogNode |
---|
accept, deserializeMetadata, deserializeMetadata, dump, ensureId, getAppSendBeginTs, getAppSendDoneTs, getAttachment, getBinding, getCheckpointVersion, getCreateTs, getEnqueueTs, getEnqueueTsMicros, getFields, getGraphId, getId, getInMsgsInTransaction, getIsInboundMessage, getIsInternal, getIsLastTransaction, getIsMessage, getIsOutboundMessage, getIsPriority, getIsReadOnly, getIsReplayedMessage, getMessageBus, getMessageBusAsRaw, getMessageChannel, getMessageChannelAsRaw, getMessageFlow, getMessageKey, getMessageKeyAsRaw, getMessageReflector, getMessageSender, getMessageSequenceNumber, getMetadata, getOfid, getOriginTs, getOutMsgsInTransaction, getOutTs, getOutTsMicros, getParent, getParentId, getPoolingListener, getPostDeserializeTs, getPostProcessingTs, getPostProcessingTsMicros, getPostSerializeTs, getPostWireSendTs, getPostWireTs, getPreDeserializeTs, getPreProcessingTs, getPreProcessingTsMicros, getPreSerializeTs, getPreWireTs, getReceiveTs, getSendStartTs, getSendTs, getSerializedMetadataLength, getStableTransactionId, getTransactionId, getTransactionInSequenceNumber, getTransactionOutSequenceNumber, getTypeFromJson, getValidationErrors, isPossibleDuplicate, isValid, metadataToJsonString, metadataToJsonString, metadataToString, serializeMetadata, setAppSendBeginTs, setAppSendDoneTs, setAsInboundMessage, setAsInternal, setAsLastTransaction, setAsMessage, setAsOutboundMessage, setAsPriority, setAsReplayedMessage, setAttachment, setBinding, setCheckpointVersion, setCreateTs, setEnqueueTsMicros, setId, setInMsgsInTransaction, setMessageBus, setMessageBusAsRaw, setMessageChannel, setMessageChannelAsRaw, setMessageFlow, setMessageKey, setMessageKeyAsRaw, setMessageSender, setMessageSequenceNumber, setOriginTs, setOutMsgsInTransaction, setOutTs, setOutTsMicros, setParentId, setPoolingListener, setPossibleDuplicate, setPostDeserializeTs, setPostProcessingTs, setPostProcessingTsMicros, setPostSerializeTs, setPostWireSendTs, setPostWireTs, setPreDeserializeTs, setPreProcessingTs, setPreProcessingTsMicros, setPreSerializeTs, setPreWireTs, setReceiveTs, setSendStartTs, setSendTs, setStableTransactionId, setTransactionId, setTransactionInSequenceNumber, setTransactionOutSequenceNumber |
Methods inherited from class com.neeve.sma.MessageViewImpl |
---|
acquire, getMessage, getMessageEncodingType, getOwnershipCount, getTag, getType, getVfid, referenceTracker, setTag |
Methods inherited from class com.neeve.util.UtlListElement |
---|
count, insertAfter, insertBefore, isLinked, next, previous, unlink, wipe |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.neeve.ods.IStoreObject |
---|
acquire, deserializeMetadata, deserializeMetadata, ensureId, getBinding, getCheckpointVersion, getId, getOfid, getOwnershipCount, getSerializedMetadataLength, getStableTransactionId, getTransactionId, serializeMetadata, setBinding, setCheckpointVersion, setId, setStableTransactionId, setTransactionId |
Methods inherited from interface com.neeve.sma.MapMessageView |
---|
getMessageReflector |
Methods inherited from interface com.neeve.rog.IRogValidatable |
---|
getValidationErrors, isValid |
Field Detail |
---|
public static final SrvMonInvokeCommandRequest[] EMPTY_ARRAY
Method Detail |
---|
public static SrvMonInvokeCommandRequest create()
public static SrvMonInvokeCommandRequest create(com.eaio.uuid.UUID id)
public static SrvMonInvokeCommandRequest createFromXbufContainerPacket(PktPacket packet)
public static SrvMonInvokeCommandRequest createFromSerializedXbufContainerPacket(ByteBuffer serializedPacket)
public static SrvMonInvokeCommandRequest createFromSerializedXbufContainerPacket(byte[] serializedPacket)
public static SrvMonInvokeCommandRequest createFromSerializedXbufContainer(ByteBuffer serializedContainer)
public static SrvMonInvokeCommandRequest createFromSerializedXbufContainer(byte[] serializedContainer)
public static SrvMonInvokeCommandRequest createFromRawJson(String json)
public static SrvMonInvokeCommandRequest createFromJson(String json)
public static SrvMonInvokeCommandRequest createFrom(ByteBuffer serializedContainer)
public static SrvMonInvokeCommandRequest createFrom(byte[] serializedContainer)
public static final void setDesyncPolicy(com.neeve.xbuf.XbufDesyncPolicy val)
public static final com.neeve.xbuf.XbufDesyncPolicy getDesyncPolicy()
public static final void setFieldInterest(List<Integer> fieldIds)
public final void clearContent()
public final void syncFieldBitmask()
public final void desyncFieldBitmask()
public final PktBuffer getBackingBuffer()
public static final void optimizeFor(int val)
public final PktPacket getPacket()
getPacket
in interface com.neeve.link.ILnkMessage
public final com.google.protobuf.Message serializeToProtobuf()
IRogNode
serializeToProtobuf
in interface IRogNode
public final String serializeToRawJson()
public final String serializeToJson()
MessageView
Serializing/deserializing a message to/from JSON is an optional operation
serializeToJson
in interface MessageView
public final SrvMonInvokeCommandRequest deserializeFromProtobuf(com.google.protobuf.Message message)
IRogNode
deserializeFromProtobuf
in interface IRogNode
message
- The protobuf messagepublic final SrvMonInvokeCommandRequest deserializeFromRawJson(String json)
public final SrvMonInvokeCommandRequest deserializeFromJson(String json)
MessageView
deserializeFromJson
in interface MessageView
json
- The view's backing message serialized as a json string.
Serializing/deserializing a message to/from JSON is an optional operation
public final void setAsReadOnly()
IRogNode
Note: This read-only flag only applies to data, not metadata
setAsReadOnly
in interface IRogNode
setAsReadOnly
in class com.neeve.rog.impl.RogNode
public int dispose()
MessageViewImpl
MessageView.dispose()
This is the default implementation of the dispose method. The implementation just decrements the ownership count. Implementations that implement view object pooling or other such functionality should override this method but invoke this method to decrement the object reference count.
dispose
in interface IStoreObject
dispose
in interface IRogNode
dispose
in interface MessageView
dispose
in class com.neeve.rog.impl.RogNode
public void undispose(com.eaio.uuid.UUID id)
undispose
in class com.neeve.rog.impl.RogNode
public static final int getXRogTypeFieldId()
This method can be used to set field interests.
getXRogType()
public final void setXRogType(short val)
public final short getXRogType()
public final void setXRogTypeFrom(com.neeve.xbuf.XbufVariableShortField val)
public final com.neeve.xbuf.XbufVariableShortField getXRogTypeField()
public final boolean hasXRogType()
public final void clearXRogType()
public static final int getTargetFieldId()
This method can be used to set field interests.
getTarget()
public final void setTarget(String val)
ISrvMonInvokeCommandRequest
setTarget
in interface ISrvMonInvokeCommandRequest
val
- The value to set.public final String getTarget()
ISrvMonInvokeCommandRequest
getTarget
in interface ISrvMonInvokeCommandRequest
public final void lendTarget(XString val)
ISrvMonInvokeCommandRequest
lendTarget
in interface ISrvMonInvokeCommandRequest
val
- The value to set.public final void setTargetFrom(long val)
ISrvMonInvokeCommandRequest
NOTE:
This is the same as calling ISrvMonInvokeCommandRequest.setTarget(String)
.
with Long.valueOf(val).toString(), except that using this method is a zero garbage
operation for Xbuf encoding.
setTargetFrom
in interface ISrvMonInvokeCommandRequest
public final <T extends XString> T getTargetTo(XString.Factory<T> factory)
ISrvMonInvokeCommandRequest
If the value of this field is not null
this method creates an XString from
the provided Factory, copies this field's value into the type, and returns the new
XString.);
This is a zero garbage operation if the provided factory is backed by a pool and the pool; has available instances;
getTargetTo
in interface ISrvMonInvokeCommandRequest
factory
- The factory from which to get the XString to copy into and return
null
.public final void setTargetFrom(XString val)
ISrvMonInvokeCommandRequest
NOTE:
This is a Zero Garbage operation for XBuf encoded objects. Additionally, this setter
can be more efficient than ISrvMonInvokeCommandRequest.setTarget(String)
because it avoids encoding the value into a String
if the given XString
is already encoded.
setTargetFrom
in interface ISrvMonInvokeCommandRequest
public final void getTargetTo(XString val)
ISrvMonInvokeCommandRequest
NOTE:
This is a Zero Garbage operation for XBuf encoded objects. Additionally, this getter
can be more efficient than ISrvMonInvokeCommandRequest.getTarget()
bec
because it can avoid decoding the value into an String
.
getTargetTo
in interface ISrvMonInvokeCommandRequest
ISrvMonInvokeCommandRequest.getTarget()
public final XString getTargetUnsafe()
ISrvMonInvokeCommandRequest
NOTE:
This method retrieves the raw value backed by this object's buffer. This is a useful operation
when copying this field value to another object because it avoids copying the data into an intermediate
XString and instead allows direct byte transfer from the raw value to the target object.
However, this accessor is inherently unsafe because the buffer backing this object can be changed which would consequently invalidate the XString returned by this method. Consequently, the caller must not retain the returned raw value beyond the scope of this object's lifespan and access to the raw value follows the same threading rules as access to this object.
Additionally, the caller must not in any way mutate or modify the returned value as doing so could corrupt this object's backing buffer.
getTargetUnsafe
in interface ISrvMonInvokeCommandRequest
ISrvMonInvokeCommandRequest.getTarget()
public final void setTargetFrom(com.neeve.xbuf.XbufStringField val)
public final com.neeve.xbuf.XbufStringField getTargetField()
public final boolean hasTarget()
ISrvMonInvokeCommandRequest
hasTarget
in interface ISrvMonInvokeCommandRequest
ISrvMonInvokeCommandRequest.getTarget()
public final void clearTarget()
ISrvMonInvokeCommandRequest
clearTarget
in interface ISrvMonInvokeCommandRequest
ISrvMonInvokeCommandRequest.setTarget(String)
public static final int getCommandNameFieldId()
This method can be used to set field interests.
getCommandName()
public final void setCommandName(String val)
ISrvMonInvokeCommandRequest
setCommandName
in interface ISrvMonInvokeCommandRequest
val
- The value to set.public final String getCommandName()
ISrvMonInvokeCommandRequest
getCommandName
in interface ISrvMonInvokeCommandRequest
public final void lendCommandName(XString val)
ISrvMonInvokeCommandRequest
lendCommandName
in interface ISrvMonInvokeCommandRequest
val
- The value to set.public final void setCommandNameFrom(long val)
ISrvMonInvokeCommandRequest
NOTE:
This is the same as calling ISrvMonInvokeCommandRequest.setCommandName(String)
.
with Long.valueOf(val).toString(), except that using this method is a zero garbage
operation for Xbuf encoding.
setCommandNameFrom
in interface ISrvMonInvokeCommandRequest
public final <T extends XString> T getCommandNameTo(XString.Factory<T> factory)
ISrvMonInvokeCommandRequest
If the value of this field is not null
this method creates an XString from
the provided Factory, copies this field's value into the type, and returns the new
XString.);
This is a zero garbage operation if the provided factory is backed by a pool and the pool; has available instances;
getCommandNameTo
in interface ISrvMonInvokeCommandRequest
factory
- The factory from which to get the XString to copy into and return
null
.public final void setCommandNameFrom(XString val)
ISrvMonInvokeCommandRequest
NOTE:
This is a Zero Garbage operation for XBuf encoded objects. Additionally, this setter
can be more efficient than ISrvMonInvokeCommandRequest.setCommandName(String)
because it avoids encoding the value into a String
if the given XString
is already encoded.
setCommandNameFrom
in interface ISrvMonInvokeCommandRequest
public final void getCommandNameTo(XString val)
ISrvMonInvokeCommandRequest
NOTE:
This is a Zero Garbage operation for XBuf encoded objects. Additionally, this getter
can be more efficient than ISrvMonInvokeCommandRequest.getCommandName()
bec
because it can avoid decoding the value into an String
.
getCommandNameTo
in interface ISrvMonInvokeCommandRequest
ISrvMonInvokeCommandRequest.getCommandName()
public final XString getCommandNameUnsafe()
ISrvMonInvokeCommandRequest
NOTE:
This method retrieves the raw value backed by this object's buffer. This is a useful operation
when copying this field value to another object because it avoids copying the data into an intermediate
XString and instead allows direct byte transfer from the raw value to the target object.
However, this accessor is inherently unsafe because the buffer backing this object can be changed which would consequently invalidate the XString returned by this method. Consequently, the caller must not retain the returned raw value beyond the scope of this object's lifespan and access to the raw value follows the same threading rules as access to this object.
Additionally, the caller must not in any way mutate or modify the returned value as doing so could corrupt this object's backing buffer.
getCommandNameUnsafe
in interface ISrvMonInvokeCommandRequest
ISrvMonInvokeCommandRequest.getCommandName()
public final void setCommandNameFrom(com.neeve.xbuf.XbufStringField val)
public final com.neeve.xbuf.XbufStringField getCommandNameField()
public final boolean hasCommandName()
ISrvMonInvokeCommandRequest
hasCommandName
in interface ISrvMonInvokeCommandRequest
ISrvMonInvokeCommandRequest.getCommandName()
public final void clearCommandName()
ISrvMonInvokeCommandRequest
clearCommandName
in interface ISrvMonInvokeCommandRequest
ISrvMonInvokeCommandRequest.setCommandName(String)
public static final int getParametersFieldId()
This method can be used to set field interests.
getParameters()
public static final com.neeve.xbuf.XbufRepeatedStringFieldBuffer createParametersFieldBuffer(int initialBufferLength, boolean isNative)
For example the following would result in a bulk transfer from this message
XbufRepeatedStringFieldBuffer preallocated = SrvMonInvokeCommandRequest.createParametersFieldBuffer(1024, true); // The following would then result in a buffer copy without any iteration: preallocated.setValue(inboundMessage.getParametersIterator()); // The preallocated bulk copied values can then be transfered to an outbound message: outboundMessage.setParameters.setValueFrom(preallocated);
Bulk transfer from the backing buffer may only possible between two fields with the same id (protobuf tag) because the bulk transfered bytes are in protobuf wire format which for most repeated fields encode the field's tag for each element.
initialBufferLength
- the initial size of the underlying backing buffer.isNative
- Whether the backing buffer should be a native or heap buffer.public final void setParameters(String[] val)
ISrvMonInvokeCommandRequest
For example when invoking MyApp doSend --rate 20 --count 1000 true the parameters would look like:
setParameters
in interface ISrvMonInvokeCommandRequest
val
- The value to set.public final void setParametersFrom(XIterator<String> val)
ISrvMonInvokeCommandRequest
This method will call XIterator.toFirst()
before and after setting the values, meaning
that all values from the iterator will be set and the iterator will be reset on return.
This method is zero garbage for Xbuf generated classes, and this method is optimized such that calling this with an iterator from another 'parameters' accessor can copy the values without iteration.
For example when invoking MyApp doSend --rate 20 --count 1000 true the parameters would look like:
NOTE:
Passing a null
or empty iterator has the same affect as calling ISrvMonInvokeCommandRequest.setParameters(String[])
with
a value of null
.
setParametersFrom
in interface ISrvMonInvokeCommandRequest
val
- the values to set.public final void addParameters(String val)
ISrvMonInvokeCommandRequest
This method is zero garbage for Xbuf generated classes, and this method is optimized such that calling this with an iterator from another 'parameters' accessor can copy the values without iteration.
For objects generated with json encoding, or transactional state entities, using this method is currently efficient than doing a bulk set. For xbuf generated messages however, this method is optimized to directly serialize to an encoded backing buffer.
For example when invoking MyApp doSend --rate 20 --count 1000 true the parameters would look like:
addParameters
in interface ISrvMonInvokeCommandRequest
val
- the value to add.public final String[] getParameters()
ISrvMonInvokeCommandRequest
If the field is not set this method will return null
.
For example when invoking MyApp doSend --rate 20 --count 1000 true the parameters would look like:
getParameters
in interface ISrvMonInvokeCommandRequest
null
.public final String[] getParametersEmptyIfNull()
ISrvMonInvokeCommandRequest
null
or not set.
For example when invoking MyApp doSend --rate 20 --count 1000 true the parameters would look like:
getParametersEmptyIfNull
in interface ISrvMonInvokeCommandRequest
null
if not set.ISrvMonInvokeCommandRequest.getParameters()
public final XStringIterator getParametersIterator()
ISrvMonInvokeCommandRequest
This method will always return a non null iterator value. The returned iterator is not threadsafe, and the caller may not hold on to it beyond the pooling lifespan of this object. Depending on the implementation, the same iterator instance may be returned by this object on each call to avoid garbage. Each time this method is called the iterator is reset by calling its toFirst() method. Callers should therefore be especially careful about calling this method while iterating on the iterator returned by this method.
This method is zero garbage for Xbuf generated classes, and this method is optimized such that
passing the returned iterator to another object's setXXX(com.neeve.lang.XStringIterator)
method
can perform a direct copy of the underlying values without iteration.
For example when invoking MyApp doSend --rate 20 --count 1000 true the parameters would look like:
getParametersIterator
in interface ISrvMonInvokeCommandRequest
public final void clearParameters()
ISrvMonInvokeCommandRequest
For example when invoking MyApp doSend --rate 20 --count 1000 true the parameters would look like:
clearParameters
in interface ISrvMonInvokeCommandRequest
ISrvMonInvokeCommandRequest.setParameters(String[])
public final boolean isDirty()
public static final com.neeve.xbuf.XbufSchema createSchema()
public final byte[] serializeToByteArray()
MessageView
serializeToByteArray
in interface MessageView
public final ByteBuffer serializeToByteBuffer()
MessageView
serializeToByteBuffer
in interface MessageView
public final com.neeve.io.IOBuffer serializeToIOBuffer(boolean useNative)
MessageView
MessageView
to an IOBuffer.
Ownership of the returned IOBuffer is given to the caller which should dispose of it when done.
The buffer backing the IOBuffer should be flipped (ready for read) upon return.
serializeToIOBuffer
in interface MessageView
serializeToIOBuffer
in class MessageViewImpl
useNative
- Whether the returned buffer should be native.
MessageView
serialized to an IOBuffer.public final PktPacket serializeToPacket()
MessageView
serializeToPacket
in interface MessageView
public final SrvMonInvokeCommandRequest deserializeFromByteArray(byte[] array)
MessageView
deserializeFromByteArray
in interface MessageView
array
- The view's backing message serialized as a byte array.public final SrvMonInvokeCommandRequest deserializeFromByteBuffer(ByteBuffer buffer)
MessageView
deserializeFromByteBuffer
in interface MessageView
buffer
- The view's backing message serialized as a byte buffer.public final SrvMonInvokeCommandRequest deserializeFromPacket(PktPacket packet)
MessageView
deserializeFromPacket
in interface MessageView
packet
- The view's backing message serialized as a packet.public final void sync()
MessageView
sync
in interface MessageView
public final SrvMonInvokeCommandRequest copy()
The copy copies primitive, enum and embedded entity fields into the returned copy. Each embedded entity field is cloned so that modifications made to the copy's embedded entity fields do not affect this SrvMonInvokeCommandRequest's embedded entity fields.
The returned copy will be writeable even if this SrvMonInvokeCommandRequest is read only.
No metadata is copied except as documented IRogCopyableNode
.
See IRogCopyableNode
for more detailed information on the semantics of this method.
copy
in interface IRogCopyableNode<ISrvMonInvokeCommandRequest>
copy
in interface ISrvMonInvokeCommandRequest
copy
in interface CopyableMessageView<ISrvMonInvokeCommandRequest>
IRogCopyableNode
,
CopyableMessageView
public final void copyInto(SrvMonInvokeCommandRequest copy)
The copy clears the target's contents and copies primitive, enum and embedded entity fields into the provided copy. Each embedded entity field is cloned so that modifications made to the copy's embedded entity fields do not affect this SrvMonInvokeCommandRequest's embedded entity fields.
The returned copy will be writeable even if this SrvMonInvokeCommandRequest is read only.
No metadata is copied except as documented IRogCopyableNode
.
See IRogCopyableNode
for more detailed information on the semantics of this method.
copyInto
in interface ISrvMonInvokeCommandRequest
copy
- The target to copy into which must not be null or read only.public final int desync(PktBuffer buffer, int pos, boolean frameOnly)
desync
in interface com.neeve.xbuf.IXbufDesyncer
public boolean needsSync()
MessageReflector
needsSync
in interface MessageReflector
public final boolean fieldExists(Object message, String name)
MessageReflector
fieldExists
in interface MessageReflector
message
- The message to check in.name
- The field to check for.public final boolean isFieldReflectable(Object message, String name)
MessageReflector
isFieldReflectable
in interface MessageReflector
message
- The message to check in.name
- The field to check for.
public final String getFieldValueAsString(Object message, String name)
MessageReflector
Note that this method is generally less efficient than its variant
MessageReflector.getFieldValueAsString(Object, String[])
since this method requires
splitting the supplied path name into its dot separated path components. In cases
where the caller intends to reuse the same path name often, it is better
for the caller to supply it in split form.
getFieldValueAsString
in interface MessageReflector
message
- The message to introspect.name
- The field whose value is to be retrieved specified as a bean path
MessageReflector.fieldExists(java.lang.Object, java.lang.String)
and MessageReflector.isFieldReflectable(java.lang.Object, java.lang.String)
methodspublic final String getFieldValueAsString(Object message, String[] pathComponents)
MessageReflector
getFieldValueAsString
in interface MessageReflector
message
- The message to introspect.pathComponents
- The path components to use to access the field.
MessageReflector.fieldExists(java.lang.Object, java.lang.String)
and MessageReflector.isFieldReflectable(java.lang.Object, java.lang.String)
methodspublic final XString getFieldValueAsRawString(Object message, String name)
MessageReflector
Note that this method is generally less efficient than its variant
MessageReflector.getFieldValueAsString(Object, String[])
since this method requires
splitting the supplied path name into its dot separated path components. In cases
where the caller intends to reuse the same path name often, it is better
for the caller to supply it in split form.
getFieldValueAsRawString
in interface MessageReflector
message
- The message to introspect.name
- The field whose value is to be retrieved specified as a bean path
MessageReflector.fieldExists(java.lang.Object, java.lang.String)
and MessageReflector.isFieldReflectable(java.lang.Object, java.lang.String)
methodspublic final XString getFieldValueAsRawString(Object message, String[] pathComponents)
MessageReflector
getFieldValueAsRawString
in interface MessageReflector
message
- The message to introspect.pathComponents
- The path components to use to access the field.
MessageReflector.fieldExists(java.lang.Object, java.lang.String)
and MessageReflector.isFieldReflectable(java.lang.Object, java.lang.String)
methodspublic final boolean appendFieldValueTo(Object message, String name, XString target)
MessageReflector
If the field is reflectable and has a non null value, then it will be appended otherwise, this method must return false.
appendFieldValueTo
in interface MessageReflector
appendFieldValueTo
in class com.neeve.rog.impl.RogNode
message
- the node on which to reflect (which need not be this object).name
- the bean path to the field.target
- The target XString into which to append the result.
public final boolean appendFieldValueTo(Object node, String[] pathComponents, XString target)
MessageReflector
If the field is reflectable and has a non null value, then it will be appended otherwise, this method must return false.
appendFieldValueTo
in interface MessageReflector
appendFieldValueTo
in class com.neeve.rog.impl.RogNode
node
- the node on which to reflect (which need not be this object).pathComponents
- the bean path to the field on the provided object split by its '.' separated components.target
- The target XString into which to append the result.
public final IStoreObject.EncodingType getContentEncodingType()
IStoreObject
getContentEncodingType
in interface IStoreObject
public final PktPacket serialize()
IStoreObject
serialize
in interface IStoreObject
public final SrvMonInvokeCommandRequest deserialize(PktPacket packet)
IStoreObject
deserialize
in interface IStoreObject
packet
- The object in serialized form.
public final IStoreObject setFieldValue(int id, Object val)
IStoreObject
setFieldValue
in interface IStoreObject
setFieldValue
in class com.neeve.rog.impl.RogNode
This method is invoked during the rollback process to restore field values.
public final String toJsonString(boolean includeMetadata, String metadataObjectName, String payloadObjectName)
IRogJsonizable
toJsonString
in interface IRogJsonizable
includeMetadata
- Specify this parameter for the ROG entity
metadata to also be included in the JSON output. If included, the
entire ROG entity object is treated as a composite object containing
a nested metadata object and a nested data object. The next two
parameters metadataObjectName and dataObjectName
specify the names of the nested objects as they will appear in
the output JSON string.metadataObjectName
- The name of the nested metadata object
as it will appear in the output JSON string. A value of null will
default to using 'metadata' as the nested object name.payloadObjectName
- The name of the nested data object as it
will appear in the output JSON string. A value of null will default
to using 'data' as the nested object name.public final String toJsonString()
IRogJsonizable
toJsonString
in interface IRogJsonizable
public final String toString()
MessageViewImpl
toString
in class com.neeve.rog.impl.RogNode
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |