1 4 package com.tc.object.msg; 5 6 import com.tc.async.api.EventContext; 7 import com.tc.bytes.TCByteBuffer; 8 import com.tc.io.TCByteBufferOutput; 9 import com.tc.net.protocol.tcm.MessageChannel; 10 import com.tc.net.protocol.tcm.MessageMonitor; 11 import com.tc.net.protocol.tcm.TCMessageHeader; 12 import com.tc.net.protocol.tcm.TCMessageType; 13 import com.tc.object.session.SessionID; 14 15 import java.io.IOException ; 16 17 22 public class RequestRootMessageImpl extends DSOMessageBase implements EventContext, RequestRootMessage { 23 private final static byte ROOT_NAME = 1; 24 25 private String rootName; 26 27 public RequestRootMessageImpl(MessageMonitor monitor, TCByteBufferOutput out, MessageChannel channel, TCMessageType type) { 28 super(monitor, out, channel, type); 29 } 30 31 public RequestRootMessageImpl(SessionID sessionID, MessageMonitor monitor, MessageChannel channel, TCMessageHeader header, TCByteBuffer[] data) { 32 super(sessionID, monitor, channel, header, data); 33 } 34 35 protected void dehydrateValues() { 36 putNVPair(ROOT_NAME, rootName); 37 } 38 39 protected boolean hydrateValue(byte name) throws IOException { 40 switch (name) { 41 case ROOT_NAME: 42 this.rootName = getStringValue(); 43 return true; 44 default: 45 return false; 46 } 47 } 48 49 public String getRootName() { 50 return rootName; 51 } 52 53 public void initialize(String name) { 54 this.rootName = name; 55 } 56 } | Popular Tags |