copper-server-api/src/main/java/com/pogeyan/cmis/api/utils/Helpers.java
/**
	 * Await actor for the prescribed time and return the value.
	 *
	 * @param <T>
	 *            the generic type
	 * @param actorRef
	 *            the actor ref
	 * @param message
	 *            the message
	 * @param timeout
	 *            the timeout
	 * @return the object result from the actor response
	 */
Await actor for the prescribed time and return the value.
Await actor for the prescribed time and return the value .
@SuppressWarnings("unchecked")
	public static <T> T awaitActor(final ActorRef actorRef, final Object message, final Timeout timeout) {
		Future<Object> future = Patterns.ask(actorRef, message, timeout);
		try {
			T bResp = (T) Await.result(future, timeout.duration());
			return bResp;
		} catch (Exception e) {
			return null;
		}
	}
@ SuppressWarnings ( "unchecked" ) public static < T > T awaitActor ( final ActorRef actorRef , final Object message , final Timeout timeout ) { Future < Object > future = Patterns . ask ( actorRef , message , timeout ) ; try { T bResp = ( T ) Await . result ( future , timeout . duration ( ) ) ; return bResp ; } catch ( Exception e ) { return null ; } }
Await actor for the prescribed time and return the value.
Await actor for the prescribed time and return the value .