public class GridMessageListenHandler extends Object implements GridContinuousHandler
| Constructor and Description |
|---|
GridMessageListenHandler()
Required by
Externalizable. |
GridMessageListenHandler(Object topic,
GridBiPredicate<UUID,Object> pred) |
| Modifier and Type | Method and Description |
|---|---|
void |
notifyCallback(UUID nodeId,
UUID routineId,
Collection<?> objs,
GridKernalContext ctx)
Notifies local callback.
|
void |
onListenerRegistered(UUID routineId,
GridKernalContext ctx)
Callback called after listener is registered and acknowledgement is sent.
|
Object |
orderedTopic() |
void |
p2pMarshal(GridKernalContext ctx)
Deploys and marshals inner objects (called only if peer deployment is enabled).
|
void |
p2pUnmarshal(UUID nodeId,
GridKernalContext ctx)
Unmarshals inner objects (called only if peer deployment is enabled).
|
void |
readExternal(ObjectInput in) |
boolean |
register(UUID nodeId,
UUID routineId,
GridKernalContext ctx)
Registers listener.
|
String |
toString() |
void |
unregister(UUID routineId,
GridKernalContext ctx)
Unregisters listener.
|
void |
writeExternal(ObjectOutput out) |
public GridMessageListenHandler()
Externalizable.public GridMessageListenHandler(@Nullable Object topic, GridBiPredicate<UUID,Object> pred)
topic - Topic.pred - Predicate.public boolean register(UUID nodeId, UUID routineId, GridKernalContext ctx) throws GridException
register in interface GridContinuousHandlernodeId - ID of the node that started routine.routineId - Routine ID.ctx - Kernal context.GridException - In case of error.public void onListenerRegistered(UUID routineId, GridKernalContext ctx)
onListenerRegistered in interface GridContinuousHandlerroutineId - Routine ID.ctx - Kernal context.public void unregister(UUID routineId, GridKernalContext ctx)
unregister in interface GridContinuousHandlerroutineId - Routine ID.ctx - Kernal context.public void notifyCallback(UUID nodeId, UUID routineId, Collection<?> objs, GridKernalContext ctx)
notifyCallback in interface GridContinuousHandlernodeId - ID of the node where notification came from.routineId - Routine ID.objs - Notification objects.ctx - Kernal context.public void p2pMarshal(GridKernalContext ctx) throws GridException
p2pMarshal in interface GridContinuousHandlerctx - Kernal context.GridException - In case of error.public void p2pUnmarshal(UUID nodeId, GridKernalContext ctx) throws GridException
p2pUnmarshal in interface GridContinuousHandlernodeId - Sender node ID.ctx - Kernal context.GridException - In case of error.@Nullable public Object orderedTopic()
orderedTopic in interface GridContinuousHandlernull, notifications
will be sent in non-ordered messages.public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionCopyright © 2014. All rights reserved.