PageRenderTime 12ms CodeModel.GetById 1ms app.highlight 7ms RepoModel.GetById 2ms app.codeStats 0ms

/hazelcast/src/main/java/com/hazelcast/impl/management/MemberConfigRequest.java

https://bitbucket.org/gabral6_gmailcom/hazelcast
Java | 53 lines | 27 code | 10 blank | 16 comment | 0 complexity | db43a979303e1b0226b3c5d54cf5199d MD5 | raw file
 1/*
 2 * Copyright (c) 2008-2013, Hazelcast, Inc. All Rights Reserved.
 3 *
 4 * Licensed under the Apache License, Version 2.0 (the "License");
 5 * you may not use this file except in compliance with the License.
 6 * You may obtain a copy of the License at
 7 *
 8 * http://www.apache.org/licenses/LICENSE-2.0
 9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package com.hazelcast.impl.management;
18
19import com.hazelcast.config.ConfigXmlGenerator;
20import com.hazelcast.core.Hazelcast;
21import com.hazelcast.core.HazelcastInstance;
22
23import java.io.DataInput;
24import java.io.DataOutput;
25import java.io.IOException;
26
27// author: sancar - 11.12.2012
28public class MemberConfigRequest implements ConsoleRequest{
29
30    public MemberConfigRequest(){
31        super();
32    }
33
34    public int getType() {
35        return ConsoleRequestConstants.REQUEST_TYPE_MEMBER_CONFIG;
36    }
37
38    public Object readResponse(DataInput in) throws IOException {
39        return in.readUTF();
40    }
41
42    public void writeResponse(ManagementCenterService mcs, DataOutput dos) throws Exception {
43        String clusterXml;
44        clusterXml = new ConfigXmlGenerator(true).generate(mcs.getHazelcastInstance().getConfig());
45        dos.writeUTF(clusterXml);
46    }
47
48    public void writeData(DataOutput out) throws IOException {
49    }
50
51    public void readData(DataInput in) throws IOException {
52    }
53}