JBoss Remoting 3.1.0.Beta1

org.jboss.remoting3
Interface TypedRequest<I,O>

Type Parameters:
I - the request type
O - 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.


Method Summary
 O castReply(Object reply)
          Check the reply type.
 

Method Detail

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

JBoss Remoting 3.1.0.Beta1

Copyright © 2010 JBoss, a division of Red Hat, Inc.