public final class MessageIdHolders
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
MessageIdHolders.MessageIdHolderInvocationHandler |
| Modifier and Type | Field and Description |
|---|---|
static MessageIdHolder |
NO_ID |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
addMessageId(T delegateTo,
long messageId)
Creates a dynamic proxy that implements MessageIdHolder automatically.
|
static org.ardulink.util.Optional<MessageIdHolder> |
toHolder(java.lang.Object msg) |
public static final MessageIdHolder NO_ID
public static <T> T addMessageId(T delegateTo,
long messageId)
MessageIdHolder.getId() will return the passed
messageId. All other calls are forwarded to the passed
delegateTo.delegateTo - the instance to delegate all calls except
MessageIdHolder.getId()messageId - the messageId to return when MessageIdHolder.getId()
is calledMessageIdHolderpublic static org.ardulink.util.Optional<MessageIdHolder> toHolder(java.lang.Object msg)
Copyright © 2016. All rights reserved.