org.jboss.remoting3
Interface TypedRequest<I,O>
- Type Parameters:
I - the request typeO - the reply type for this request type
public interface TypedRequest<I,O>
A request whose replies should be of a specific type. Request classes may choose to implement this interface
in order to provide additional type checking and convenience to Remoting API users by causing the reply type
to be chosen based upon the request type.
castReply
O castReply(Object reply)
throws ClassCastException
- Check the reply type. If the reply type is incorrect in any way, a
java.lang.ClassCastException is
thrown.
- Parameters:
reply - the raw reply
- Returns:
- the typesafe reply
- Throws:
ClassCastException - if a type conversion error occurs
Copyright © 2010 JBoss, a division of Red Hat, Inc.