# Poco::Redis

# class RedisEventArgs

Library: Redis
Package: Redis
Header: Poco/Redis/RedisEventArgs.h

## Description

Event arguments for AsyncReader events.

## Member Summary

Member Functions: exception, isStopped, message, stop

## Constructors

### RedisEventArgs

RedisEventArgs(
RedisType::Ptr message
);

Creates the RedisEventArgs from the given message.

### RedisEventArgs

RedisEventArgs(
Exception * e
);

Creates the RedisEventArgs from the given Redis Exception.

## Destructor

### ~RedisEventArgs

~RedisEventArgs();

Destroys the RedisEventArgs.

## Member Functions

### exception

const Exception * exception() const;

Returns the exception if any, otherwise it returns null pointer.

### isStopped

bool isStopped() const;

Returns true when the AsyncReader will stop.

### message

RedisType::Ptr message() const;

Returns the message retrieved from the Redis server. This can be a NULL pointer when this event is about an exception.

### stop

void stop();

When called, the AsyncReader will stop.

Note: The AsyncReader will always stop when this is an exception event. Use this for example for pub/sub when there are no subcribers anymore.