com.sun.enterprise.admin.remote
Class RemoteResponseManager

java.lang.Object
  extended by com.sun.enterprise.admin.remote.RemoteResponseManager
All Implemented Interfaces:
ResponseManager

public class RemoteResponseManager
extends Object
implements ResponseManager

This class is responsible for handling the Remote Server response. Note that an unusul paradigm is used here. Success is signaled by throwing a "success" exception. This breaks the overarching rule about Exceptions but is very useful in CLI. CLI has the pattern of: Error: Throw an Exception Success: Don't throw an Exception The logic becomes difficult. The command itself has to know how to print a success message properly instead of just putting such a message inside an Exception object and throwing it. In such a system it is cleaner to do this: Error: throw failure exception Success: throw success exception

Author:
bnevins

Constructor Summary
RemoteResponseManager(InputStream in, int code, Logger logger)
           
 
Method Summary
 Map<String,String> getMainAtts()
           
 void process()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteResponseManager

public RemoteResponseManager(InputStream in,
                             int code,
                             Logger logger)
                      throws RemoteException,
                             IOException
Throws:
RemoteException
IOException
Method Detail

process

public void process()
             throws RemoteException
Specified by:
process in interface ResponseManager
Throws:
RemoteException

getMainAtts

public Map<String,String> getMainAtts()


Copyright © 2012. All Rights Reserved.