package x;

import java.nio.ByteBuffer;

import com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl;
import com.sun.corba.se.impl.protocol.giopmsgheaders.KeyAddr;
import com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase;
import com.sun.corba.se.pept.transport.Connection;
import com.sun.corba.se.spi.ior.iiop.GIOPVersion;
import com.sun.corba.se.spi.orb.ORB;

public class MyCorbaMessageMediatorImpl extends CorbaMessageMediatorImpl {

    public MyCorbaMessageMediatorImpl(ORB orb, Connection connection) {
        super(orb, connection);
        dispatchHeader = MessageBase.createRequest(orb,
                    GIOPVersion.V1_2, (byte) 1, (byte)1, true,
                    new MyIOR(orb), KeyAddr.value, "new_context", null,
                    null);
        MyInputObject.defaultMessage = dispatchHeader;
        byte[] bytes = new byte[]{0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,4};
        dispatchByteBuffer = ByteBuffer.wrap(bytes);
    }

}
