/[classpath]/classpath/gnu/CORBA/GIOP/ErrorMessage.java
ViewVC logotype

Diff of /classpath/gnu/CORBA/GIOP/ErrorMessage.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by audriusa, Tue Oct 4 17:58:14 2005 UTC revision 1.5 by audriusa, Fri Oct 21 16:15:32 2005 UTC
# Line 38  exception statement from your version. * Line 38  exception statement from your version. *
38    
39  package gnu.CORBA.GIOP;  package gnu.CORBA.GIOP;
40    
41    import gnu.CORBA.Functional_ORB;
42  import gnu.CORBA.IOR;  import gnu.CORBA.IOR;
43  import gnu.CORBA.Minor;  import gnu.CORBA.Minor;
44    
# Line 47  import java.io.OutputStream; Line 48  import java.io.OutputStream;
48  import java.net.Socket;  import java.net.Socket;
49    
50  import org.omg.CORBA.MARSHAL;  import org.omg.CORBA.MARSHAL;
51    import org.omg.CORBA.ORB;
52    
53  /**  /**
54   * The error message is sent in response to the message, encoded   * The error message is sent in response to the message, encoded
# Line 60  import org.omg.CORBA.MARSHAL; Line 62  import org.omg.CORBA.MARSHAL;
62  public class ErrorMessage  public class ErrorMessage
63    extends MessageHeader    extends MessageHeader
64  {  {
65      /**
66       * Use serialVersionUID for interoperability.
67       */
68      private static final long serialVersionUID = 1;
69      
70    /**    /**
71     * Create a new error message, setting the message field     * Create a new error message, setting the message field
72     * to the {@link MESSAGE_ERROR} and the version number to     * to the {@link MESSAGE_ERROR} and the version number to
# Line 74  public class ErrorMessage Line 81  public class ErrorMessage
81    /**    /**
82     * Send the error message to the given IOR address.     * Send the error message to the given IOR address.
83     *     *
84     * @param to the IOR address (host and port, other fields     * @param ior the IOR address (host and port, other fields
85     * are not used).     * are not used).
86       *
87       * @param orb the ORB, sending the error message.
88     */     */
89    public void send(IOR ior)    public void send(IOR ior, ORB orb)
90    {    {
91      try      try
92        {        {
93          Socket socket = new Socket(ior.Internet.host, ior.Internet.port);          Socket socket;
94            
95            if (orb instanceof Functional_ORB)
96              socket = ((Functional_ORB) orb).socketFactory.createClientSocket(
97                ior.Internet.host, ior.Internet.port);
98            else
99              socket = new Socket(ior.Internet.host, ior.Internet.port);
100    
101          OutputStream socketOutput = socket.getOutputStream();          OutputStream socketOutput = socket.getOutputStream();
102          write(socketOutput);          write(socketOutput);

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26