KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > filesys > netbios > server > NetBIOSNameEvent


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.filesys.netbios.server;
18
19 import org.alfresco.filesys.netbios.NetBIOSName;
20
21 /**
22  * NetBIOS name server event class.
23  */

24 public class NetBIOSNameEvent
25 {
26     /*
27      * NetBIOS name event status codes
28      */

29
30     public static final int ADD_SUCCESS = 0; // local name added successfully
31
public static final int ADD_FAILED = 1; // local name add failure
32
public static final int ADD_DUPLICATE = 2; // local name already in use
33
public static final int ADD_IOERROR = 3; // I/O error during add name broadcast
34
public static final int QUERY_NAME = 4; // query for local name
35
public static final int REGISTER_NAME = 5; // remote name registered
36
public static final int REFRESH_NAME = 6; // name refresh
37
public static final int REFRESH_IOERROR = 7; // refresh name I/O error
38

39     /**
40      * NetBIOS name details
41      */

42
43     private NetBIOSName m_name;
44
45     /**
46      * Name status
47      */

48
49     private int m_status;
50
51     /**
52      * Create a NetBIOS name event.
53      *
54      * @param name NetBIOSName
55      * @param sts int
56      */

57     protected NetBIOSNameEvent(NetBIOSName name, int sts)
58     {
59         m_name = name;
60         m_status = sts;
61     }
62
63     /**
64      * Return the NetBIOS name details.
65      *
66      * @return NetBIOSName
67      */

68     public final NetBIOSName getNetBIOSName()
69     {
70         return m_name;
71     }
72
73     /**
74      * Return the NetBIOS name status.
75      *
76      * @return int
77      */

78     public final int getStatus()
79     {
80         return m_status;
81     }
82 }
Popular Tags