PageRenderTime 28ms CodeModel.GetById 18ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

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

https://bitbucket.org/gabral6_gmailcom/hazelcast
Java | 50 lines | 22 code | 12 blank | 16 comment | 0 complexity | 6f667764fbc0ce0e891ef17b13b33057 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 java.io.DataInput;
20import java.io.DataOutput;
21import java.io.IOException;
22
23// author: sancar - 21.12.2012
24public class ShutdownMemberRequest implements ConsoleRequest {
25
26    public ShutdownMemberRequest(){
27
28    }
29
30    public int getType() {
31        return ConsoleRequestConstants.REQUEST_TYPE_MEMBER_SHUTDOWN;
32    }
33
34    public Object readResponse(DataInput in) throws IOException {
35        return in.readUTF();
36    }
37
38    public void writeResponse(ManagementCenterService mcs, DataOutput dos) throws Exception {
39        mcs.getHazelcastInstance().getLifecycleService().shutdown();
40        dos.writeUTF("successful");
41    }
42
43    public void writeData(DataOutput out) throws IOException {
44
45    }
46
47    public void readData(DataInput in) throws IOException {
48
49    }
50}