|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xnap.chat.AbstractChatProvider org.xnap.plugin.opennap.net.OpenNapServer
public class OpenNapServer
Field Summary | |
---|---|
static int |
DEFAULT_META_PORT
|
static int |
DEFAULT_PORT
|
static int |
FAILED_INTERVAL
Timeout before connect retry if connection failed. |
static int |
LOGIN_INTERVAL
Timeout before connect retry if login failed. |
Constructor Summary | |
---|---|
OpenNapServer()
|
|
OpenNapServer(OpenNapServerData data)
|
|
OpenNapServer(java.lang.String host,
int port)
|
|
OpenNapServer(java.lang.String host,
int port,
boolean autoConnect)
|
|
OpenNapServer(java.lang.String host,
int port,
java.lang.String network)
|
|
OpenNapServer(java.lang.String host,
int port,
java.lang.String network,
boolean autoConnect)
|
|
OpenNapServer(java.lang.String host,
java.lang.String ip,
int port,
java.lang.String network,
int fileCount,
int fileSize,
int userCount,
boolean autoConnect)
|
Method Summary | |
---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
|
void |
addStateListener(StateListener listener)
|
boolean |
canAutoRemove()
|
void |
connect()
Connects to the server. |
void |
disconnect()
Disconnects from the server. |
boolean |
equals(java.lang.Object obj)
Returns true if obj has the same hostname and port. |
javax.swing.Action[] |
getActions()
Returns an array of actions that can be performed on the provider. |
boolean |
getAutoConnect()
|
java.lang.String |
getAutoJoinChannels()
|
OpenNapChannel |
getChannel(java.lang.String name)
|
OpenNapChannel |
getChannel(java.lang.String name,
boolean add)
|
ChannelInfo[] |
getChannels()
Returns the the channels on this server. |
java.lang.String |
getEmail()
|
int |
getFileCount()
|
int |
getFileSize()
|
java.lang.String |
getHost()
|
java.lang.String |
getIP()
|
long |
getLastConnect()
Returns the absolute time of the last successful connect. |
OpenNapListener |
getListener()
Returns the associated listener for incoming requests. |
OpenNapUser |
getLocalPeer()
|
int |
getLocalPort()
Returns port of listener or 0 if there is no listener running, which means XNap is behind a firewall. |
java.lang.String |
getName()
Returns the name of the server shown to the user. |
OpenNapNetwork |
getNetwork()
Returns the network this server is part of. |
java.lang.String |
getNetworkName()
Returns the name of the network this server is part of. |
long |
getNextAutoConnectTime()
Returns the absolute time of the next reconnect |
java.lang.String |
getNick()
|
java.lang.String |
getPassword()
Returns the password used for the login. |
int |
getPort()
Returns the remote port. |
java.lang.String |
getRedirectedHost()
|
int |
getRedirectedPort()
|
OpenNapServerRunner |
getRunner()
|
Range[] |
getShared()
Returns the index range of shared files. |
java.lang.String |
getStatus()
|
OpenNapUser |
getUser(java.lang.String nick)
|
int |
getUserCount()
|
OpenNapServerVersion |
getVersion()
|
boolean |
isConnected()
|
boolean |
isDisconnected()
|
boolean |
isLoginCustomized()
|
boolean |
isNewUser()
|
boolean |
isRedirector()
|
boolean |
isTemporary()
|
void |
join(java.lang.String name)
Adds the channel to the ChatManager and joins the channel. |
void |
removeChannel(OpenNapChannel c)
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
|
void |
removeStateListener(StateListener listener)
|
void |
setAutoConnect(boolean newvalue)
|
void |
setAutoJoinChannels(java.lang.String autoJoinChannels)
|
void |
setEmail(java.lang.String email)
|
void |
setHost(java.lang.String host)
|
void |
setIP(java.lang.String newValue)
OpenNapigator sends an ip which is sometimes more reliable than the hostname. |
void |
setLastConnect(long lastConnect)
|
void |
setListener(OpenNapListener newValue)
|
void |
setNetwork(OpenNapNetwork network)
|
void |
setNetworkName(java.lang.String networkName)
|
void |
setNewUser(boolean newUser)
Set newUser to true to create a new account on the
next logon. |
void |
setNick(java.lang.String nick)
|
void |
setPassword(java.lang.String password)
|
void |
setPort(int port)
|
void |
setRedirectedHost(java.lang.String redirectedHost)
|
void |
setRedirectedPort(int redirectedPort)
|
void |
setRedirector(boolean redirector)
|
void |
setShared(Range range)
|
void |
setStats(int userCount,
int fileCount,
int fileSize)
|
void |
setTemporary(boolean temporary)
|
void |
setVersion(java.lang.String newValue)
|
java.lang.String |
toString()
Returns the value of AbstractChatProvider.getName() . |
Methods inherited from class org.xnap.chat.AbstractChatProvider |
---|
addChatProviderListener, channelsUpdated, getMessages, messageReceived, removeChatProviderListener, setMessageBufferSize, setName |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_PORT
public static final int DEFAULT_META_PORT
public static final int LOGIN_INTERVAL
public static final int FAILED_INTERVAL
Constructor Detail |
---|
public OpenNapServer(java.lang.String host, java.lang.String ip, int port, java.lang.String network, int fileCount, int fileSize, int userCount, boolean autoConnect)
public OpenNapServer(java.lang.String host, int port, java.lang.String network)
public OpenNapServer(java.lang.String host, int port, java.lang.String network, boolean autoConnect)
public OpenNapServer(java.lang.String host, int port)
public OpenNapServer(java.lang.String host, int port, boolean autoConnect)
public OpenNapServer()
public OpenNapServer(OpenNapServerData data)
Method Detail |
---|
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
public void addStateListener(StateListener listener)
public void removeStateListener(StateListener listener)
public boolean canAutoRemove()
public void connect()
public void disconnect()
public void join(java.lang.String name)
ChatManager
and joins the channel.
public boolean equals(java.lang.Object obj)
obj
has the same hostname and port.
equals
in class java.lang.Object
public OpenNapChannel getChannel(java.lang.String name, boolean add)
public OpenNapChannel getChannel(java.lang.String name)
public javax.swing.Action[] getActions()
ChatProvider
public java.lang.String getAutoJoinChannels()
public boolean getAutoConnect()
public ChannelInfo[] getChannels()
ChatProvider
public java.lang.String getEmail()
public int getFileCount()
public int getFileSize()
public java.lang.String getHost()
public java.lang.String getIP()
public long getLastConnect()
public OpenNapListener getListener()
public OpenNapUser getLocalPeer()
public int getLocalPort()
public java.lang.String getName()
ChatProvider
getName
in interface ChatProvider
getName
in class AbstractChatProvider
public java.lang.String getNetworkName()
public OpenNapNetwork getNetwork()
public long getNextAutoConnectTime()
public java.lang.String getNick()
public java.lang.String getPassword()
public int getPort()
public java.lang.String getRedirectedHost()
public int getRedirectedPort()
public OpenNapServerRunner getRunner()
public Range[] getShared()
public void setShared(Range range)
public java.lang.String getStatus()
public OpenNapUser getUser(java.lang.String nick)
public int getUserCount()
public OpenNapServerVersion getVersion()
public boolean isConnected()
public boolean isDisconnected()
public boolean isLoginCustomized()
public boolean isNewUser()
public boolean isRedirector()
public boolean isTemporary()
public void removeChannel(OpenNapChannel c)
public void setAutoConnect(boolean newvalue)
public void setAutoJoinChannels(java.lang.String autoJoinChannels)
public void setEmail(java.lang.String email)
java.lang.IllegalArgumentException
- if newValue is invalid.public void setHost(java.lang.String host)
public void setIP(java.lang.String newValue)
public void setLastConnect(long lastConnect)
public void setListener(OpenNapListener newValue)
public void setNetwork(OpenNapNetwork network)
public void setNetworkName(java.lang.String networkName)
public void setNewUser(boolean newUser)
newUser
to true to create a new account on the
next logon.
public void setNick(java.lang.String nick)
java.lang.IllegalArgumentException
- if nick
is invalid.public void setPassword(java.lang.String password)
java.lang.IllegalArgumentException
- if password
is invalid.public void setPort(int port)
public void setRedirectedHost(java.lang.String redirectedHost)
public void setRedirectedPort(int redirectedPort)
public void setRedirector(boolean redirector)
public void setStats(int userCount, int fileCount, int fileSize)
public void setTemporary(boolean temporary)
public void setVersion(java.lang.String newValue)
public java.lang.String toString()
AbstractChatProvider
AbstractChatProvider.getName()
.
toString
in class AbstractChatProvider
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |