//@TODO: this was done just as a hack to have the information ready, requires review and refactoring
if( cls.isAssignableFrom( String.class ) ) {
CommandImpl cmd = new CommandImpl( "lookupKsessionId",
Arrays.asList( new Object[] { identifier } ) );
ConversationManager connm = this.grid.get( ConversationManager.class );
Object result = ConversationUtil.sendMessage( connm,
(InetSocketAddress) ((Map<String, Address>)this.gsd.getAddresses()).get( "socket" ).getObject(),
this.gsd.getId(),
cmd );
return (T) result;
}
if( cls.isAssignableFrom( StatefulKnowledgeSession.class ) ){
if ( logger.isDebugEnabled() ) {
logger.debug( "(" + Thread.currentThread().getId() + ")" + Thread.currentThread().getName() +" GNRC I'm now trying to locate a happy SKS... " + identifier );
}
CommandImpl cmd = new CommandImpl( "lookupKsession",
Arrays.asList( new Object[]{identifier} ) );
if ( logger.isDebugEnabled() ) {
logger.debug( "(" + Thread.currentThread().getId() + ")" + Thread.currentThread().getName() +" GNRC I have the command ready" );
}
ConversationManager connm = this.grid.get( ConversationManager.class );
if ( logger.isDebugEnabled() ) {
logger.debug( "(" + Thread.currentThread().getId() + ")" + Thread.currentThread().getName() +" GNRC I have the convo manager ready" );
logger.debug( "(" + Thread.currentThread().getId() + ")" + Thread.currentThread().getName() +" GNRC Sending to " + ((Map<String, Address>)this.gsd.getAddresses()).get( "socket" ).getObject() );
logger.debug( "(" + Thread.currentThread().getId() + ")" + Thread.currentThread().getName() +" GNRC The gsd, whatever it is " + this.gsd.getId() );
}